/* Reset and base styles */
* {
    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: #333;
    overflow-x: hidden;
}

/* Container styles - responsive height */
.container {
    width: 100%;
    height: 450px; /* Default iframe height */
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Full screen mode detection */
@media (min-height: 600px) and (min-width: 800px) {
    .container {
        height: 90vh;
        padding: 20px;
    }
}

/* Progress bar */
.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    height: 8px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    height: 100%;
    width: 33.33%;
    border-radius: 20px;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: -25px;
    right: 0;
    font-size: 12px;
    color: white;
    font-weight: 500;
}

/* Budget display */
.budget-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wallet-icon {
    font-size: 24px;
}

.budget-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.budget-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.budget-amount {
    font-size: 20px;
    font-weight: bold;
    color: #2E7D32;
}

/* Scenario panel */
.scenario-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.scenario-title {
    font-size: 18px;
    font-weight: bold;
    color: #1976D2;
    margin-bottom: 10px;
}

.scenario-description {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

/* Options panel */
.options-panel {
    display: flex;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.option-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 120px;
    position: relative;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.option-card:active {
    transform: translateY(-2px);
}

.option-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.option-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.option-cost {
    font-size: 16px;
    font-weight: bold;
    color: #E53935;
    margin-bottom: 6px;
}

.option-description {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

/* Feedback panel */
.feedback-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}

.feedback-title {
    font-size: 18px;
    font-weight: bold;
    color: #1976D2;
    margin-bottom: 10px;
}

.feedback-text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 15px;
}

.tradeoff-info {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.tradeoff-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tradeoff-item:last-child {
    margin-bottom: 0;
}

.label {
    font-weight: bold;
    color: #333;
}

.value {
    color: #E53935;
    font-weight: 500;
}

.next-btn, .restart-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.next-btn:hover, .restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Summary panel */
.summary-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.5s ease;
}

.summary-title {
    font-size: 18px;
    font-weight: bold;
    color: #1976D2;
    margin-bottom: 10px;
    text-align: center;
}

.summary-text {
    font-size: 14px;
    color: #555;
    text-align: center;
    margin-bottom: 15px;
}

.summary-choices {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 12px;
}

.choice-item {
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.choice-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.key-concepts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.concept-item {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.concept-title {
    font-weight: bold;
    color: #1976D2;
    font-size: 12px;
    margin-bottom: 4px;
}

.concept-description {
    font-size: 10px;
    color: #555;
    line-height: 1.3;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    max-width: 200px;
    text-align: center;
}

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

/* Mobile optimizations */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .options-panel {
        flex-direction: column;
        gap: 8px;
    }
    
    .option-card {
        min-height: 80px;
        padding: 12px;
    }
    
    .option-icon {
        font-size: 24px;
    }
    
    .key-concepts {
        grid-template-columns: 1fr;
    }
    
    .scenario-panel {
        padding: 15px;
    }
    
    .budget-display {
        padding: 10px 15px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .option-card {
        min-height: 100px;
    }
    
    .next-btn, .restart-btn {
        padding: 15px;
        font-size: 16px;
    }
}