@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --color-black: #0a0a0a;
    --color-gray-900: #171717;
    --color-gray-800: #262626;
    --color-gray-700: #404040;
    --color-gray-600: #525252;
    --color-gray-500: #737373;
    --color-gray-400: #a3a3a3;
    --color-gray-300: #d4d4d4;
    --color-gray-200: #e5e5e5;
    --color-gray-100: #f5f5f5;
    --color-amber-500: #f59e0b;
    --color-amber-400: #fbbf24;
    --color-amber-300: #fcd34d;
    --color-red-500: #ef4444;
    --color-purple-500: #8b5cf6;
    --color-blue-500: #3b82f6;
    --color-green-500: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-black);
    color: var(--color-gray-100);
    line-height: 1.6;
}

.font-geist-mono {
    font-family: monospace;
    letter-spacing: -0.025em;
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.nav-link {
    color: var(--color-gray-400);
    transition: color 0.2s;
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
}

.nav-link:hover {
    color: var(--color-amber-500);
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--color-amber-500);
    transform: scaleX(0);
    transition: transform 0.2s;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* Buttons */
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(245, 158, 11, 0.2);
    color: var(--color-amber-500);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(245, 158, 11, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn:hover {
    background-color: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(245, 158, 11, 0.2);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--color-gray-300);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--color-gray-700);
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: var(--color-amber-500);
    color: var(--color-amber-500);
    transform: translateY(-2px);
}

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

/* Background Effects */
.bg-radial-gradient {
    background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.3), transparent 70%),
                radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.2), transparent 70%);
}

.bg-radial-gradient-alt {
    background: radial-gradient(circle at 50% 100%, rgba(59, 130, 246, 0.2), transparent 70%),
                radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.1), transparent 70%);
}

.bg-radial-gradient-game {
    background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.1), transparent 70%);
}

.bg-grid {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(245, 158, 11, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(245, 158, 11, 0.05) 1px, transparent 1px);
}

/* Game Cards */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0.25rem;
    padding: 1px;
    background: linear-gradient(
        to bottom right, 
        rgba(245, 158, 11, 0.8), 
        rgba(245, 158, 11, 0.3) 50%, 
        rgba(245, 158, 11, 0.1)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.2);
}

.game-card-inner {
    background-color: rgba(23, 23, 23, 0.95);
    padding: 1.5rem;
    height: 100%;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.game-difficulty {
    display: flex;
    gap: 4px;
}

.difficulty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-gray-700);
}

.difficulty-dot.active {
    background-color: var(--color-amber-500);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.game-description {
    color: var(--color-gray-300);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.game-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.game-feature {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(38, 38, 38, 0.8);
    color: var(--color-gray-300);
    border-radius: 0.25rem;
    border: 1px solid rgba(64, 64, 64, 0.5);
}

.game-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--color-amber-500);
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.game-btn:hover {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.game-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Modal */
.modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-radius: 0.25rem;
    border: 1px solid rgba(64, 64, 64, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

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

.game-interface {
    height: 400px;
    border: 1px solid rgba(64, 64, 64, 0.3);
}

.game-grid {
    background-size: 20px 20px;
    background-image:
        linear-gradient(to right, rgba(245, 158, 11, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
}

.game-character {
    width: 30px;
    height: 30px;
    background-color: var(--color-amber-500);
    border-radius: 4px;
    transition: transform 0.1s, background-color 0.3s;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    position: relative;
    z-index: 10;
}

.game-character::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    filter: blur(2px);
}

.game-character.jumping {
    animation: characterJump 0.5s cubic-bezier(0.2, 0, 0.3, 1);
}

@keyframes characterJump {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-80px) scale(0.95); }
    100% { transform: translateY(0) scale(1); }
}

.game-character.double-jump {
    animation: characterDoubleJump 0.4s cubic-bezier(0.2, 0, 0.3, 1);
}

@keyframes characterDoubleJump {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-50px) scale(0.9) rotate(180deg); }
    100% { transform: translateY(0) scale(1) rotate(360deg); }
}

.game-character.damaged {
    animation: characterDamaged 0.3s ease-in-out;
}

@keyframes characterDamaged {
    0% { transform: translateX(0); background-color: var(--color-red-500); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.game-character.boosted {
    animation: characterBoosted 0.3s ease-in-out;
}

@keyframes characterBoosted {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Game Objects */
.game-object {
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-object.collected {
    animation: objectCollected 0.5s ease-out;
}

@keyframes objectCollected {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.8; }
    100% { transform: scale(0); opacity: 0; }
}

.game-object.enemy {
    animation: enemyFloat 2s infinite alternate ease-in-out;
}

@keyframes enemyFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

.game-object.obstacle {
    position: relative;
}

.game-object.obstacle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    opacity: 0.7;
}

/* Collectible Shine Effect */
.game-object.collectible {
    position: relative;
    overflow: hidden;
}

.game-object.collectible::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shineSweep 2s infinite;
    transform: rotate(30deg);
}

@keyframes shineSweep {
    0% { transform: rotate(30deg) translateX(-100%); }
    100% { transform: rotate(30deg) translateX(100%); }
}

/* Game Feedback Text */
@keyframes feedbackText {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Stats Panel */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.stat-item {
    background-color: rgba(38, 38, 38, 0.5);
    padding: 0.75rem;
    border-radius: 0.25rem;
    text-align: center;
    border: 1px solid rgba(64, 64, 64, 0.2);
    transition: background-color 0.2s, border-color 0.2s;
}

.stat-item:hover {
    background-color: rgba(38, 38, 38, 0.7);
    border-color: rgba(245, 158, 11, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-gray-400);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-amber-500);
}

/* Stamina Bar */
.stamina-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(38, 38, 38,.8);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(64, 64, 64, 0.3);
}

.stamina-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, var(--color-amber-400), var(--color-amber-500));
    border-radius: 3px;
    transition: width 0.3s;
}

.stamina-fill.recovering {
    background: linear-gradient(to right, var(--color-gray-400), var(--color-gray-500));
}

.stamina-fill.depleted {
    animation: staminaPulse 1s infinite;
}

@keyframes staminaPulse {
    0% { background-color: rgba(239, 68, 68, 0.6); }
    50% { background-color: rgba(239, 68, 68, 0.9); }
    100% { background-color: rgba(239, 68, 68, 0.6); }
}

/* Controls Panel */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(38, 38, 38, 0.5);
    padding: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(64, 64, 64, 0.2);
    transition: all 0.2s;
}

.control-item:hover {
    background-color: rgba(38, 38, 38, 0.7);
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

.control-key {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(64, 64, 64, 0.5);
    color: var(--color-amber-500);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    min-width: 40px;
    text-align: center;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.control-item:hover .control-key {
    background-color: rgba(245, 158, 11, 0.2);
    box-shadow: 0 2px 0 rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

.control-item:active .control-key {
    transform: translateY(1px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
}

.control-desc {
    font-size: 0.75rem;
    color: var(--color-gray-300);
}

/* Boons Panel */
.boons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.boon-item {
    display: flex;
    align-items: center;
    background-color: rgba(38, 38, 38, 0.5);
    padding: 0.75rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.boon-item:hover:not(.locked) {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.boon-item.locked {
    opacity: 0.7;
    cursor: not-allowed;
    border-color: rgba(64, 64, 64, 0.2);
}

.boon-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
    margin-right: 0.75rem;
    color: var(--color-amber-500);
    font-weight: bold;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.boon-info {
    flex-grow: 1;
}

.boon-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gray-200);
    margin-bottom: 0.25rem;
}

.boon-desc {
    font-size: 0.7rem;
    color: var(--color-gray-400);
}

/* Boon Selection Items */
.boon-selection-item {
    background-color: rgba(38, 38, 38, 0.5);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.25rem;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.boon-selection-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--color-amber-500), transparent);
}

.boon-selection-item:hover {
    background-color: rgba(64, 64, 64, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.boon-selection-item:hover .boon-selection-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--boon-color);
}

.boon-selection-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background-color: rgba(var(--boon-rgb), 0.2);
    color: var(--boon-color);
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(var(--boon-rgb), 0.5);
}

.boon-selection-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--boon-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.boon-selection-desc {
    font-size: 0.8rem;
    color: var(--color-gray-300);
    text-align: center;
}

.boon-selection-item.zeus {
    --boon-color: #3b82f6;
    --boon-rgb: 59, 130, 246;
}

.boon-selection-item.ares {
    --boon-color: #ef4444;
    --boon-rgb: 239, 68, 68;
}

.boon-selection-item.athena {
    --boon-color: #8b5cf6;
    --boon-rgb: 139, 92, 246;
}

.boon-selection-item.hermes {
    --boon-color: #10b981;
    --boon-rgb: 16, 185, 129;
}

.boon-selection-item.poseidon {
    --boon-color: #0ea5e9;
    --boon-rgb: 14, 165, 233;
}

.boon-selection-item.artemis {
    --boon-color: #14b8a6;
    --boon-rgb: 20, 184, 166;
}

.boon-selection-item.hades {
    --boon-color: #f43f5e;
    --boon-rgb: 244, 63, 94;
}

/* Game Object Animations */
@keyframes hitFlash {
    0% { filter: brightness(1); }
    50% { filter: brightness(3); }
    100% { filter: brightness(1); }
}

@keyframes deathAnimation {
    0% { transform: scale(1); opacity: 1; }
    30% { transform: scale(1.5); opacity: 0.7; }
    100% { transform: scale(0); opacity: 0; }
}

/* Floating Score Text */
.floating-score {
    position: absolute;
    font-weight: bold;
    animation: floatingScore 1.5s ease-out forwards;
    z-index: 100;
    pointer-events: none;
}

@keyframes floatingScore {
    0% { opacity: 0; transform: translateY(0); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-50px); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stats-grid, .controls-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .boons-grid {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
}
