* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e80303 0%, #a00202 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #e80303 0%, #a00202 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* Progress Bar */
.progress-container {
    padding: 30px;
    background: #f8f9fa;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e80303 0%, #a00202 100%);
    width: 20%;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-steps .step {
    font-size: 13px;
    color: #999;
    transition: color 0.3s;
}

.progress-steps .step.active {
    color: #e80303;
    font-weight: 600;
}

.progress-steps .step.completed {
    color: #4CAF50;
}

/* Step Content */
.step-container {
    padding: 40px 30px;
    min-height: 500px;
}

.step-content {
    display: none;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.hint {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Step 1: Country Selection */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #e80303;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.country-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(232, 3, 3, 0.15);
    border-color: #e80303;
}

.country-card.selected {
    border-color: #e80303;
    background: linear-gradient(135deg, rgba(232, 3, 3, 0.05), rgba(160, 2, 2, 0.1));
    box-shadow: 0 5px 20px rgba(232, 3, 3, 0.2);
}

.country-flag {
    font-size: 40px;
    margin-bottom: 10px;
}

.country-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.country-name-en {
    font-size: 12px;
    color: #999;
}

/* Step 2: Days Selection */
.days-input-container {
    max-width: 500px;
    margin: 0 auto 40px;
}

.days-input-container input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
    margin-bottom: 20px;
}

.days-input-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #e80303;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(232, 3, 3, 0.4);
}

.days-input-container input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #e80303;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.days-display {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.days-display input[type="number"] {
    width: 80px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.days-display span {
    font-size: 20px;
    color: #666;
}

/* Step 3: Usage Level */
.usage-level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.usage-level-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.usage-level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(232, 3, 3, 0.15);
    border-color: #e80303;
}

.usage-level-card.selected {
    border-color: #e80303;
    background: linear-gradient(135deg, rgba(232, 3, 3, 0.05), rgba(160, 2, 2, 0.1));
    box-shadow: 0 5px 20px rgba(232, 3, 3, 0.2);
}

.usage-level-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #e80303;
}

.level-en {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.level-desc {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.level-data {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

/* Step 4: Scenarios */
.scenario-list {
    margin-bottom: 30px;
}

.scenario-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.scenario-item:hover {
    background: #f8f9fa;
}

.scenario-checkbox {
    margin-bottom: 10px;
}

.scenario-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #e80303;
}

.scenario-checkbox label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scenario-checkbox strong {
    color: #333;
    font-size: 16px;
}

.scenario-desc {
    color: #666;
    font-size: 14px;
}

.scenario-usage {
    color: #e80303;
    font-size: 13px;
    font-weight: 600;
}

.scenario-hours {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 28px;
    margin-top: 10px;
}

.scenario-hours label {
    color: #666;
    font-size: 14px;
}

.scenario-hours input {
    width: 80px;
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.budget-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.budget-section label {
    display: block;
    margin-bottom: 10px;
    color: #666;
}

.budget-section input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

/* Step 5: Results */
.summary-box {
    background: linear-gradient(135deg, rgba(232, 3, 3, 0.05), rgba(160, 2, 2, 0.1));
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.summary-box h3 {
    margin-bottom: 15px;
    color: #333;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
}

.summary-item .label {
    color: #666;
}

.summary-item .value {
    font-weight: 600;
    color: #333;
}

.summary-item .value.highlight {
    color: #e80303;
    font-size: 18px;
}

.recommendations-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recommendation-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    transition: all 0.3s;
}

.recommendation-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.recommendation-card.best-match {
    border-color: #e80303;
    background: linear-gradient(135deg, rgba(232, 3, 3, 0.03), #ffffff);
}

.best-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #e80303;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.rec-header h3 {
    color: #333;
    font-size: 20px;
}

.rec-score {
    background: #e80303;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.rec-provider {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
}

.rec-details {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.rec-detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

.rec-detail-item .icon {
    font-size: 16px;
}

.rec-price {
    font-size: 28px;
    font-weight: 700;
    color: #e80303;
    margin-bottom: 10px;
}

.rec-reason {
    color: #666;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.rec-comparison {
    margin-bottom: 15px;
}

.comparison-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.comparison-used {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    transition: width 0.5s ease;
}

.comparison-text {
    font-size: 13px;
    color: #666;
}

.btn-purchase {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #e80303 0%, #a00202 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 3, 3, 0.4);
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

button {
    padding: 14px 32px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-next {
    background: linear-gradient(135deg, #e80303 0%, #a00202 100%);
    color: white;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(232, 3, 3, 0.4);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-back {
    background: #f0f0f0;
    color: #666;
}

.btn-back:hover {
    background: #e0e0e0;
}

.btn-restart {
    background: #f0f0f0;
    color: #666;
    display: block;
    margin: 30px auto 0;
}

.btn-restart:hover {
    background: #e0e0e0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #e80303;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .step-container {
        padding: 30px 20px;
    }

    .step-content h2 {
        font-size: 22px;
    }

    .country-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .usage-level-grid {
        grid-template-columns: 1fr;
    }

    .rec-header {
        flex-direction: column;
        gap: 10px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .plan-type-options {
        flex-direction: column;
    }
}

/* Plan Type Selection */
.plan-type-section {
    margin-top: 30px;
}

.plan-type-options {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.plan-type-option {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.plan-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.plan-type-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.plan-type-option:hover .plan-type-card {
    border-color: #e80303;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 3, 3, 0.15);
}

.plan-type-option.selected .plan-type-card {
    border-color: #e80303;
    background: linear-gradient(135deg, rgba(232, 3, 3, 0.05) 0%, rgba(160, 2, 2, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(232, 3, 3, 0.2);
}

.plan-type-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.plan-type-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.plan-type-example {
    font-size: 13px;
    color: #e80303;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(232, 3, 3, 0.08);
    border-radius: 6px;
    display: inline-block;
}
