/* Game Specific Styling for Semester Survival */

:root {
    --font-academic: 'Inter', sans-serif;
    --font-logo: 'Orbitron', sans-serif;
    
    /* Academic Theme Colors */
    --campus-dark-blue: #09132e;
    --campus-light-blue: #1e3a8a;
    --gpa-green: #10b981;
    --energy-yellow: #fbbf24;
    --danger-red: #ef4444;
    --highlight-cyan: #06b6d4;
    
    /* Standard panel styling */
    --bg-glass: rgba(9, 19, 46, 0.85);
    --border-glass: rgba(6, 182, 212, 0.25);
    --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.4);
}

body.TEMPLATE-4weird-game-page {
    background-color: #030712;
    font-family: var(--font-academic);
    color: #f3f4f6;
    overflow-x: hidden;
}

#TEMPLATE-4weird-gameCanvas {
    background-color: #050b18;
    display: block;
    width: 100%;
    height: 100%;
}

/* Custom Game HUD */
#game-hud {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 768px) {
    #game-hud {
        grid-template-columns: 1fr 1fr;
        font-size: 0.8rem;
    }
}

.hud-item {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hud-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.hud-value {
    font-family: var(--font-logo);
    font-size: 1.1rem;
    font-weight: 700;
    color: #f9fafb;
}

.hud-integrity-container {
    align-items: stretch;
}

.integrity-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    overflow: hidden;
}

.gpa-bar {
    height: 100%;
    background: var(--gpa-green);
    transition: width 0.3s ease, background 0.3s ease;
}

.energy-bar {
    height: 100%;
    background: var(--energy-yellow);
    transition: width 0.2s ease, background 0.2s ease;
}

/* Boss Health HUD */
#boss-hud-container {
    grid-column: span 4;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid var(--danger-red);
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    #boss-hud-container {
        grid-column: span 2;
    }
}

.boss-health-bar {
    height: 10px;
    background: var(--danger-red);
    box-shadow: 0 0 5px var(--danger-red);
    transition: width 0.1s linear;
}

/* Overlays Setup */
.TEMPLATE-4weird-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.TEMPLATE-4weird-overlay-content {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    box-shadow: var(--shadow-glow);
    backdrop-filter: blur(12px);
    max-height: 90vh;
    overflow-y: auto;
}

.hidden {
    display: none !important;
}

/* Game Title Graphic */
.game-logo {
    font-family: var(--font-logo);
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 15px var(--highlight-cyan);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.game-tagline {
    font-size: 1rem;
    color: #9ca3af;
    margin-bottom: 30px;
}

.menu-navigation {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 0 auto 30px auto;
}

.current-status-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-around;
    font-size: 0.9rem;
}

.current-status-card p {
    margin: 0;
}

/* Shop and Achievements Styling */
.shop-content, .achievements-content, .settings-content {
    max-width: 750px;
}

.shop-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.shop-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.shop-tab-btn.active, .shop-tab-btn:hover {
    background: var(--highlight-cyan);
    border-color: var(--highlight-cyan);
    color: #030712;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.shop-tab-pane {
    display: none;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 5px;
}

.shop-tab-pane.active {
    display: block;
}

/* Scrollbar styling for modal lists */
.shop-tab-pane::-webkit-scrollbar, .TEMPLATE-4weird-overlay-content::-webkit-scrollbar {
    width: 6px;
}
.shop-tab-pane::-webkit-scrollbar-thumb, .TEMPLATE-4weird-overlay-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.upgrades-grid, .characters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
}

@media (max-width: 580px) {
    .upgrades-grid, .characters-grid {
        grid-template-columns: 1fr;
    }
}

.upgrade-card, .character-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s;
}

.upgrade-card:hover, .character-card:hover {
    border-color: var(--highlight-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.upgrade-header, .char-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.upgrade-title, .char-title {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.95rem;
}

.upgrade-level {
    font-size: 0.75rem;
    color: var(--highlight-cyan);
    font-weight: 600;
}

.upgrade-desc, .char-desc {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 12px;
    line-height: 1.3;
}

.upgrade-buy-row, .char-buy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.btn-buy {
    background: #ffffff;
    color: #030712;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-buy:hover:not(:disabled) {
    background: var(--highlight-cyan);
}

.btn-buy:disabled {
    background: #374151;
    color: #9ca3af;
    cursor: not-allowed;
}

.shop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    padding-top: 15px;
}

.money-display {
    font-family: var(--font-logo);
    font-weight: 700;
    color: #ffffff;
}

/* Stats and Achievements Panel layout */
.achievements-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 20px;
    text-align: left;
}

@media (max-width: 768px) {
    .achievements-layout {
        grid-template-columns: 1fr;
    }
}

.stats-panel, .badges-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 15px;
}

.stats-panel h3, .badges-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    color: var(--highlight-cyan);
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 4px;
}

.stat-val {
    font-weight: 700;
    font-family: var(--font-logo);
    color: #ffffff;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 40vh;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.badge-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    opacity: 0.4;
    transition: opacity 0.3s, border-color 0.3s;
}

.badge-card.unlocked {
    opacity: 1;
    border-color: var(--energy-yellow);
    background: rgba(251, 191, 36, 0.05);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.2);
}

.badge-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.badge-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    display: block;
    line-height: 1.2;
}

.badge-desc {
    font-size: 0.6rem;
    color: #9ca3af;
    display: block;
    margin-top: 2px;
}

/* Settings styling */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    max-width: 400px;
    margin: 0 auto 20px auto;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.setting-item label {
    font-size: 0.95rem;
    color: #ffffff;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-item select {
    background: #09132e;
    color: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.danger-section {
    border-top: 1px solid rgba(239, 68, 68, 0.2);
    padding-top: 15px;
    justify-content: center;
}

.btn-danger {
    background: var(--danger-red);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: opacity 0.2s;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* Fail States Layout styling */
.fail-panel {
    border-color: var(--danger-red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.burnout-panel {
    border-color: var(--energy-yellow);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.fail-header {
    font-family: var(--font-logo);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.fail-message {
    font-style: italic;
    font-size: 1.05rem;
    color: #f3f4f6;
    margin-bottom: 20px;
    line-height: 1.4;
}

.fail-stats {
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.supp-options, .revive-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    margin: 0 auto;
}

/* Victory Overlay Details */
.victory-panel {
    border-color: var(--gpa-green);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
    max-width: 680px;
}

.victory-header {
    font-family: var(--font-logo);
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 10px var(--gpa-green);
    margin-bottom: 4px;
}

.victory-sub {
    font-size: 1.2rem;
    color: #9ca3af;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.victory-degree {
    font-size: 0.95rem;
    color: #9ca3af;
    margin-bottom: 5px;
}

.degree-classification {
    font-family: var(--font-logo);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gpa-green);
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.victory-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: left;
}

@media (max-width: 580px) {
    .victory-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.vic-stat {
    display: flex;
    flex-direction: column;
}

.vic-stat span {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
}

.vic-stat strong {
    font-family: var(--font-logo);
    font-size: 1.2rem;
    color: #ffffff;
    margin-top: 2px;
}

.endless-unlock-notice {
    font-size: 0.9rem;
    color: var(--energy-yellow);
    margin-bottom: 25px;
    font-weight: 600;
}

.victory-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Satirical Ad Card styling */
.ad-card {
    background: #09132e;
    border: 2px solid var(--highlight-cyan);
    border-radius: 12px;
    padding: 20px;
    width: 320px;
    box-shadow: var(--shadow-glow);
    text-align: center;
    position: relative;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.ad-badge {
    background: var(--highlight-cyan);
    color: #030712;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
}

.ad-timer {
    font-family: var(--font-logo);
    color: var(--energy-yellow);
    font-weight: 700;
}

.ad-content {
    margin-bottom: 20px;
}

.ad-content h3 {
    margin-top: 0;
    color: #ffffff;
    margin-bottom: 8px;
    font-family: var(--font-logo);
}

.ad-content p {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.4;
    margin-bottom: 15px;
}

.ad-visual {
    font-size: 3.5rem;
    margin: 10px 0;
}

.ad-footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.ad-wait-text {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Mobile Virtual Controls styling */
.mobile-touch-controls {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 1024px) {
    .mobile-touch-controls {
        display: flex;
    }
}

.mobile-swipe-zone {
    height: 120px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    backdrop-filter: blur(2px);
}

.mobile-swipe-zone.hidden {
    display: none !important;
}

.swipe-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    user-select: none;
}

.mobile-buttons-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    pointer-events: auto;
}

.mobile-buttons-container.hidden {
    display: none !important;
}

.mobile-action-btn {
    flex: 1;
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid var(--border-glass);
    color: #ffffff;
    padding: 12px;
    font-weight: 700;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.mobile-action-btn:active {
    background: var(--highlight-cyan);
    color: #030712;
    box-shadow: 0 0 10px var(--highlight-cyan);
}
