/* Twin Harmony Interactive GDD - Main Stylesheet */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.97);
    min-height: 100vh;
    display: flex;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.sidebar {
    width: 300px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 3px solid #3498db;
    z-index: 1000;
}

.main-content {
    margin-left: 300px;
    padding: 0;
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.logo {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.logo h1 {
    font-size: 1.8em;
    color: white;
    margin-bottom: 8px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo .subtitle {
    font-size: 0.9em;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

.nav-section {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-title {
    font-weight: 600;
    color: #3498db;
    margin: 0 20px 10px 20px;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 1px;
}

.nav-item {
    display: block;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 8px 20px;
    margin: 1px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 400;
    border-left: 3px solid transparent;
    font-size: 0.9em;
}

.nav-item:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateX(4px);
    border-left-color: #3498db;
}

.nav-item.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: 500;
    border-left-color: #fff;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.content-section {
    display: none;
    padding: 40px;
    animation: fadeIn 0.4s ease-in-out;
}

.content-section.active {
    display: block;
}

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

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    margin: -40px -40px 40px -40px;
    border-radius: 0 0 20px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 300;
}

h2 {
    color: #2c3e50;
    margin: 40px 0 20px 0;
    font-size: 2em;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    color: #34495e;
    margin: 30px 0 15px 0;
    font-size: 1.4em;
    font-weight: 500;
}

.twin-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.twin {
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
}

.ryan-card {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.kaiya-card {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.item-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: #3498db;
}

.skill-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.skill-difficulty {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    float: right;
    margin-top: -2px;
}

.demo-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin: 5px;
}

.demo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.demo-button.danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.demo-button.revive {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.timing-challenge {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #dee2e6;
    display: none;
}

.timing-challenge.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.score-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #dee2e6;
}

.score-item {
    text-align: center;
}

.score-label {
    font-size: 0.8em;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

.feedback-display {
    background: #2c3e50;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.resource-bar {
    background: #ecf0f1;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0;
}

.resource-fill {
    height: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.resource-fill.health { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.resource-fill.energy { background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); }
.resource-fill.stamina { background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%); }
.resource-fill.harmony { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); }

.sailing-simulator {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.sailing-simulator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><path d="M0 10 Q25 5 50 10 T100 10" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/></svg>');
    animation: waves 3s ease-in-out infinite;
}

@keyframes waves {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
}

.ship-controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.ship-panel {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wind-indicator {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    margin: 10px auto;
}

.wind-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 40px;
    background: white;
    transform-origin: bottom center;
    transition: transform 0.5s ease;
}

.wind-arrow::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -4px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid white;
}

.bottle-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.bottle {
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
    border: 2px solid #95a5a6;
    border-radius: 8px 8px 12px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    text-align: center;
    color: #2c3e50;
}

.bottle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bottle.selected {
    border-color: #3498db;
    border-width: 3px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.substance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.substance-btn {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8em;
    text-align: center;
}

.substance-btn:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.substance-btn.selected {
    border-color: #3498db;
    background: #3498db;
    color: white;
}

.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: 'JetBrains Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.85em;
    overflow-x: auto;
    border-left: 4px solid #3498db;
}

.implementation-box {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.warning-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.combo-display {
    font-family: 'JetBrains Mono', monospace;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.9em;
}

.perfect-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2c3e50;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.perfect-indicator.show {
    opacity: 1;
    transform: scale(1);
}

/* AI Demo Specific Styles */
.performance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.8em;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
}

.unconscious-system {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid #e74c3c;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.unconscious-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.knockout-timer {
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .twin-card,
    .ship-controls {
        grid-template-columns: 1fr;
    }
    
    .item-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 2em;
    }
}