:root {
    --bg-dark: #0a0c14;
    --card-bg: rgba(10, 12, 20, 0.95);
    --text-main: #ffffff;
    --neon-blue: #00f3ff;
    --neon-green: #00ff66;
    --neon-red: #ff3366;
    --neon-yellow: #ffd700;
    --grid-color: rgba(0, 243, 255, 0.07);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

.card {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 1200px;
    min-height: 650px; 
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    display: flex;
    flex-direction: row; 
    overflow: hidden; 
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.card-image {
    flex: 1; 
    min-width: 350px;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, transparent, var(--card-bg) 100%);
}

.card-content {
    flex: 1.2;
    padding: 3.5rem 3rem; 
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.8rem); 
    white-space: nowrap; 
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.subtitle {
    font-size: 0.65rem; /* Scaled down slightly to fit the longer text */
    color: var(--neon-blue);
    font-weight: 600;
    margin-bottom: 2rem; 
    text-transform: uppercase;
    letter-spacing: 0.02em; /* Fixed the massive letter gaps */
    line-height: 1.5; /* Ensures neat stacking on smaller screens */
    font-family: 'Press Start 2P', cursive, sans-serif;
}

.bio p {
    font-size: 1.1rem; 
    font-weight: 500; 
    color: #e2e8f0; 
    margin-bottom: 1.5rem; 
}

.instruction-text {
    color: var(--neon-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.3);
}

.interests-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.tag {
    background: rgba(0, 243, 255, 0.05);
    color: var(--neon-blue);
    padding: 0.8rem 0.5rem; 
    border-radius: 6px;
    font-size: clamp(0.65rem, 1.2vw, 0.85rem); 
    font-weight: 600;
    border: 1px solid rgba(0, 243, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: 'Poppins', sans-serif; 
}

.tag:hover {
    transform: translateY(-3px) scale(1.03); 
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.4);
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-blue);
}

/* Footer locked to the bottom */
footer {
    margin-top: auto; /* Pushes the footer dynamically to the bottom */
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding-top: 1.5rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--neon-blue);
    width: 90%;
    max-width: 650px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.2);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
    background: none;
    border: none;
}

.close-btn:hover { color: var(--neon-red); }

.modal-header {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 0 10px var(--neon-blue);
    margin-bottom: 15px;
}

.modal-stats {
    display: flex;
    justify-content: space-between;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    color: var(--neon-green);
    margin-bottom: 15px;
}

.game-canvas {
    width: 100%;
    height: 320px;
    background: #050608;
    border: 1px inset rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.btn-play {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-play:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

/* Specific Game Elements */
.tennis-ball {
    width: 30px; height: 30px; background: #ccff00; border-radius: 50%;
    position: absolute; box-shadow: inset -5px -5px 10px rgba(0,0,0,0.5); cursor: pointer;
}
.basketball-hoop {
    width: 70px; height: 10px; background: var(--neon-red); position: absolute; top: 20px;
    border-radius: 5px; box-shadow: 0 0 10px var(--neon-red);
}
.basketball-ball {
    width: 30px; height: 30px; background: #ff6600; border-radius: 50%;
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
}
.science-beaker {
    width: 100px; height: 100px; background: var(--neon-red); border-radius: 10px 10px 50px 50px;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); cursor: pointer;
    transition: background 0.1s;
}
.math-ui {
    display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 1rem;
}
.math-eq { font-size: 2rem; font-weight: bold; margin-bottom: 20px; color: white;}
.math-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;}
.math-btn { padding: 10px 20px; font-size: 1.2rem; cursor: pointer; background: #222; color: white; border: 1px solid var(--neon-blue); border-radius: 5px; font-family: 'Poppins', sans-serif; transition: 0.2s;}
.math-btn:hover { background: var(--neon-blue); color: black; }
.bug {
    width: 25px; height: 25px; background: var(--neon-red); position: absolute;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); cursor: crosshair;
}
.deal-btn {
    width: 130px; height: 130px; background: var(--neon-green); border-radius: 50%;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: flex; align-items: center; justify-content: center; font-size: 3.5rem;
    cursor: pointer; font-weight: bold; color: #000; box-shadow: 0 0 25px var(--neon-green);
    user-select: none;
}
.deal-btn:active { transform: translate(-50%, -50%) scale(0.9); }

@media (max-width: 850px) {
    .card { flex-direction: column; max-width: 500px; min-height: auto; }
    .card-image { min-width: 100%; height: 250px; }
    .card-image::after { background: linear-gradient(to bottom, transparent, var(--card-bg) 100%); }
    .card-content { padding: 2rem 1.5rem; }
    .interests-container { gap: 0.5rem; }
    .tag { font-size: 0.6rem; padding: 0.6rem 0.2rem; }
}