* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
}

/* Password Modal */
.password-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.password-modal-content {
    background: var(--surface);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.password-modal-content h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.password-modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#passwordInput {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

#passwordInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.password-modal-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.password-btn {
    flex: 1;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--primary-color);
    color: white;
}

.password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.password-btn.secondary {
    background: var(--text-secondary);
}

.password-btn.secondary:hover {
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.password-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 1rem;
    min-height: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--shadow);
    transition: box-shadow 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.form-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    font-size: 0.95rem;
    font-weight: 500;
}

input[type="number"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.conditional {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.conditional.active {
    opacity: 1;
    pointer-events: all;
}

.price-summary {
    position: sticky;
    top: 2rem;
}

.summary-sticky {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.summary-sticky h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.payment-period-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: var(--background);
    border-radius: 8px;
}

.period-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.period-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.total-price {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.total-price-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.total-price .label {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.total-price .amount {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.price-breakdown {
    margin-bottom: 1.5rem;
}

.price-breakdown h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#breakdownList {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

#breakdownList::-webkit-scrollbar {
    width: 6px;
}

#breakdownList::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 3px;
}

#breakdownList::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

#breakdownList::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
    font-size: 0.9rem;
}

.breakdown-item .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.breakdown-item .amount {
    color: var(--text-primary);
    font-weight: 600;
}

.cost-types {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.cost-item .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.cost-item .amount {
    color: var(--text-primary);
    font-weight: 600;
}

.cta-button {
    width: 100%;
    padding: 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0.75rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button.secondary {
    background: var(--primary-color);
}

.cta-button.secondary:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.disclaimer {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
}

.breakdown-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.breakdown-cost {
    color: var(--text-primary);
    font-weight: 600;
}

.breakdown-discount .breakdown-cost {
    color: #16a34a;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .price-summary {
        position: static;
        order: -1;
    }

    .summary-sticky {
        position: sticky;
        top: 1rem;
        z-index: 100;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .language-selector {
        position: static;
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .summary-sticky {
        padding: 1.5rem;
    }

    .total-price .amount {
        font-size: 1.5rem;
    }

    #breakdownList {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    .form-section {
        padding: 1rem;
    }

    .summary-sticky {
        padding: 1rem;
    }

    .form-section h2 {
        font-size: 1.25rem;
    }
    
    .payment-period-selector {
        flex-direction: column;
    }
    
    .period-btn {
        font-size: 0.85rem;
        padding: 0.625rem;
    }

    .total-price {
        padding: 1rem;
    }
    
    .total-price .label {
        font-size: 0.9rem;
    }
    
    .total-price .amount {
        font-size: 1.5rem;
    }

    .breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .breakdown-item .amount {
        font-size: 1.1rem;
        color: var(--primary-color);
    }

    .cta-button {
        font-size: 0.95rem;
        padding: 0.875rem;
    }
}
/* Info Icons & Tooltips */
.info-icon {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--primary-color);
    font-size: 1rem;
    cursor: help;
    font-weight: 600;
    vertical-align: middle;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Enhanced tooltip using title attribute */
label {
    position: relative;
}

.info-icon[title] {
    position: relative;
}

.info-icon[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    white-space: normal;
    max-width: 300px;
    width: max-content;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.info-icon[title]:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 999;
}

@media (max-width: 768px) {
    .info-icon[title]:hover::after {
        max-width: 250px;
        font-size: 0.8rem;
        padding: 0.65rem 0.85rem;
    }
}

@media (max-width: 480px) {
    .info-icon {
        font-size: 0.9rem;
        margin-left: 0.35rem;
    }
    
    .info-icon[title]:hover::after {
        max-width: 200px;
        font-size: 0.75rem;
        padding: 0.5rem 0.7rem;
        left: 0;
        transform: translateX(0);
    }
    
    .info-icon[title]:hover::before {
        left: 1rem;
        transform: translateX(0);
    }
}