:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    
    /* Responsive Spacing */
    --container-padding: clamp(20px, 5vw, 60px);
}

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

body {
    font-family: 'Outfit', 'Poppins', sans-serif;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

#portal {
    width: 100%;
    max-width: 1200px;
    padding: var(--container-padding) 20px;
    text-align: center;
}

header h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(to right, #818cf8, #c084fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    animation: fadeInDown 0.8s ease-out;
}

header p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 60px;
    animation: fadeIn 1s ease-out 0.2s both;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.game-card {
    text-decoration: none;
    color: inherit;
    perspective: 1000px;
    animation: fadeInUp 0.6s ease-out both;
}

.game-card:nth-child(1) { animation-delay: 0.3s; }
.game-card:nth-child(2) { animation-delay: 0.4s; }
.game-card:nth-child(3) { animation-delay: 0.5s; }

.card-inner {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: clamp(24px, 5vw, 40px);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.game-card:hover .card-inner {
    transform: translateY(-10px) rotateX(5deg);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -15px rgba(99, 102, 241, 0.4);
    background: rgba(30, 41, 59, 0.9);
}

.mascot-container {
    width: clamp(80px, 15vw, 120px);
    height: clamp(80px, 15vw, 120px);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    transition: 0.4s;
}

.mascot-container img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.3));
}

.mascot-container.placeholder {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.game-card:hover .mascot-container {
    transform: scale(1.15) rotate(5deg);
    background: rgba(99, 102, 241, 0.1);
}

.game-card h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    margin-bottom: 12px;
    font-weight: 700;
}

.game-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.play-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: 0.3s;
}

.game-card:hover .play-btn {
    background: var(--accent-hover);
    padding: 12px 40px;
}

.game-card.disabled {
    opacity: 0.6;
    cursor: default;
}

.game-card.disabled:hover .card-inner {
    transform: none;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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