:root {
    --primary: #6C63FF;
    --secondary: #4A44B5;
    --accent: #FF6584;
    --accent2: #00D2FF;
    --accent3: #FFC107;
    --dark: #1a1a2e;
    --darker: #0d0d1a;
    --light: #F7F9FC;
    --success: #4CAF50;
    --danger: #F44336;
    --warning: #FFC107;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--darker), var(--dark));
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(108, 99, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 101, 132, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 30% 70%, rgba(0, 210, 255, 0.1) 0%, transparent 25%);
    z-index: -1;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: float 15s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

header {
    text-align: center;
    padding: 40px 0 30px;
    position: relative;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.5);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 20px rgba(108, 99, 255, 0.5); }
    50% { box-shadow: 0 0 30px rgba(108, 99, 255, 0.8), 0 0 40px rgba(0, 210, 255, 0.6); }
    100% { box-shadow: 0 0 20px rgba(108, 99, 255, 0.5); }
}

.logo-icon i {
    font-size: 30px;
    color: white;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary), var(--accent2), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nav-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.action-btn:hover {
    background: rgba(108, 99, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 100;
}

.back-home:hover {
    background: rgba(108, 99, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.game-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 40px 0;
}

.game-card {
    background: linear-gradient(145deg, rgba(42, 42, 60, 0.7), rgba(26, 26, 46, 0.8));
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow:
        0 10px 30px rgba(0,0,0,0.4),
        inset 0 0 10px rgba(255,255,255,0.05);
    position: relative;
    cursor: pointer;
    height: 320px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 15px 40px rgba(108, 99, 255, 0.3),
        0 0 30px rgba(0, 210, 255, 0.2);
    border-color: rgba(108, 99, 255, 0.4);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(108, 99, 255, 0.1));
    z-index: 1;
}

.game-thumbnail {
    height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.game-thumbnail canvas {
    border-radius: 20px 20px 0 0;
}

.game-info {
    padding: 20px;
    text-align: center;
    z-index: 2;
    position: relative;
}

.game-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(90deg, var(--primary), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-desc {
    font-size: 1rem;
    opacity: 0.8;
}

.game-section {
    display: none;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(20, 20, 35, 0.95));
    box-shadow:
        0 10px 30px rgba(0,0,0,0.5),
        inset 0 0 15px rgba(255,255,255,0.05);
    margin-top: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.back-btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.back-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}

.game-title-lg {
    font-size: 2.2rem;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(90deg, var(--primary), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.game-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-box {
    background: linear-gradient(145deg, rgba(42, 42, 60, 0.7), rgba(26, 26, 46, 0.8));
    padding: 15px;
    border-radius: 15px;
    min-width: 100px;
    box-shadow:
        inset 0 0 8px rgba(0,0,0,0.3),
        0 4px 10px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: var(--accent2);
}

.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 14px 28px;
    border-radius: 50px;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}

.btn-danger {
    background: linear-gradient(90deg, var(--danger), #d32f2f);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
}

.game-canvas-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow:
        inset 0 0 15px rgba(0,0,0,0.5),
        0 0 20px rgba(0,0,0,0.4);
}

canvas {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #1e1e2d, #171725);
}

.message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    padding: 25px 50px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 10;
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.5);
    border: 2px solid var(--primary);
    min-width: 300px;
}

.message.show {
    opacity: 1;
}

.instructions {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 0.9rem;
    border-left: 3px solid var(--accent2);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: linear-gradient(145deg, rgba(30, 30, 45, 0.95), rgba(20, 20, 35, 0.95));
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    border-radius: 25px;
    padding: 30px 20px;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.5),
        0 0 0 1px rgba(108, 99, 255, 0.3),
        inset 0 0 15px rgba(255,255,255,0.05);
    position: relative;
    transform: translateY(50px);
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    transform: rotate(90deg);
    color: var(--accent2);
}

.modal h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 25px;
    background: linear-gradient(90deg, var(--primary), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.modal-content {
    margin-bottom: 30px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--accent2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-section h3 i {
    color: var(--primary);
}

.modal-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.social-link:hover {
    background: rgba(108, 99, 255, 0.3);
    transform: translateY(-3px);
}

.linkedin { background: rgba(10, 102, 194, 0.2); }
.portfolio { background: rgba(0, 210, 255, 0.2); }

footer {
    text-align: center;
    padding: 40px 0 30px;
    margin-top: 50px;
    font-size: 1rem;
    opacity: 0.7;
    border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .game-ui {
        flex-direction: column;
        align-items: center;
    }

    .stats {
        justify-content: center;
    }

    .controls {
        justify-content: center;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-box {
        min-width: 100px;
        padding: 15px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
    }
}
