:root {
    --primary-color: #0078d4;
    --primary-dark: #005a9e;
    --secondary-color: #50e6ff;
    --success-color: #13a10e;
    --warning-color: #ff8c00;
    --danger-color: #e81123;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f2f1;
    --bg-tertiary: #faf9f8;
    --text-primary: #323130;
    --text-secondary: #605e5c;
    --border-color: #e1dfdd;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --azure-gradient: linear-gradient(135deg, #0078d4 0%, #50e6ff 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: var(--azure-gradient);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

/* Language Selector */
.lang-selector {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    gap: 5px;
}

.lang-btn {
    padding: 6px 12px;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
}

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

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Card Styles */
.card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

.card h3 {
    color: var(--text-primary);
    margin: 20px 0 15px 0;
    font-size: 1.3rem;
}

/* Input Section */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.input-group small {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Azure Services */
.azure-services {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-group input[type="number"],
.checkbox-group select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    max-width: 180px;
}

.service-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
    background: var(--azure-gradient);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 20px;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Summary Card */
.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.summary-card h2 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.3);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-item {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.summary-item .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.summary-item .value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.summary-item .highlight {
    color: #50e6ff;
}

.benefits-list {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 8px;
}

.benefits-list h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.benefits-list ul {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.benefits-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #50e6ff;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Comparison Table */
.table-responsive {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.comparison-table thead {
    background: var(--primary-color);
    color: white;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    font-weight: 600;
    font-size: 0.95rem;
}

.comparison-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.comparison-table .best-value {
    background: #e6f7e6;
    font-weight: 600;
}

.comparison-table .recommended {
    background: linear-gradient(90deg, rgba(0,120,212,0.1) 0%, rgba(80,230,255,0.1) 100%);
    border-left: 4px solid var(--primary-color);
}

/* Earnings Card */
.earnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.earning-item {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.earning-item h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.earning-detail {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.earning-detail:last-child {
    border-bottom: none;
    font-weight: 700;
    color: var(--success-color);
    font-size: 1.1rem;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid var(--primary-color);
}

/* Services Breakdown */
.services-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.service-item {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-item .name {
    font-weight: 600;
}

.service-item .cost {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Scenario Tabs */
.scenario-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

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

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

.scenario-content {
    background: var(--bg-tertiary);
    padding: 25px;
    border-radius: 8px;
    min-height: 200px;
}

.scenario-details h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.scenario-details ul {
    list-style: none;
    padding: 0;
}

.scenario-details li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.scenario-details li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ROI Content */
.roi-content {
    display: grid;
    gap: 20px;
}

.roi-metric {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.roi-metric h4 {
    grid-column: 1 / -1;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.metric-item {
    padding: 15px;
    background: white;
    border-radius: 6px;
    text-align: center;
}

.metric-item .label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.metric-item .value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-item.positive .value {
    color: var(--success-color);
}

.metric-item.negative .value {
    color: var(--danger-color);
}

/* Chart */
.chart-card canvas {
    max-height: 400px;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: white;
    margin-top: 30px;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .earnings-grid {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
    }

    .scenario-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section {
    animation: fadeIn 0.5s ease-out;
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }

    .btn-primary {
        display: none;
    }
}
