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

:root {
    --primary-color: #6C5CE7;
    --secondary-color: #00B894;
    --dark-bg: #2D3436;
    --darker-bg: #1E272E;
    --light-text: #FFFFFF;
    --gray-text: #B2BEC3;
    --card-bg: #34495E;
    --hover-color: #A29BFE;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--light-text);
    background-color: var(--darker-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: var(--dark-bg);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background-color: transparent;
    border: 2px solid var(--gray-text);
    color: var(--gray-text);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.lang-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--light-text);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.name-note {
    font-size: 0.9rem;
    color: var(--gray-text);
    font-style: italic;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.highlight {
    color: var(--primary-color);
}

.hero-content h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 12px 40px;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.cta-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--light-text);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--gray-text);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* Games Section */
.games {
    padding: 80px 0;
    background-color: var(--darker-bg);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.game-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-info {
    padding: 1.5rem;
}

.game-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.game-genre {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.game-info p {
    color: var(--gray-text);
    margin-bottom: 1.5rem;
}

.game-links {
    display: flex;
    gap: 1rem;
}

.game-link {
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.game-link:hover {
    background-color: var(--hover-color);
}

.game-link.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
}

.game-link.secondary:hover {
    background-color: var(--primary-color);
}

/* Skills Section */
.skills {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    transition: transform 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--gray-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: var(--darker-bg);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-item {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.contact-label {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.contact-item a {
    color: var(--gray-text);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--light-text);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-button {
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.contact-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.social-link {
    padding: 12px 25px;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    color: var(--gray-text);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.95rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-text {
        font-size: 1.05rem;
    }
}

/* Small tablets and large phones */
@media (max-width: 640px) {
    nav .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .nav-links {
        order: 3;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        margin-top: 0.5rem;
        font-size: 0.9rem;
    }

    .hero {
        padding: 70px 0 50px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 15px;
    }

    .nav-links {
        display: none;
    }

    .logo {
        font-size: 1.2rem;
    }

    .language-switcher {
        gap: 0.4rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    .container {
        padding: 0 15px;
    }

    .hero {
        margin-top: 60px;
        padding: 50px 0 40px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .hero-content h2 {
        font-size: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .name-note {
        font-size: 0.85rem;
    }

    .cta-button {
        padding: 10px 30px;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .about, .games, .skills, .contact {
        padding: 50px 0;
    }

    .about-text {
        font-size: 1rem;
    }

    .game-info {
        padding: 1rem;
    }

    .game-info h3 {
        font-size: 1.3rem;
    }

    .game-genre {
        font-size: 0.85rem;
    }

    .game-info p {
        font-size: 0.9rem;
    }

    .game-link {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .skill-category h3 {
        font-size: 1.2rem;
    }

    .skill-category ul li {
        font-size: 0.95rem;
        padding: 0.6rem 0;
    }

    .contact-content p {
        font-size: 1rem;
    }

    .contact-item {
        font-size: 1rem;
    }

    .contact-button, .social-link {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    footer p {
        font-size: 0.9rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: var(--card-bg);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s;
    position: relative;
}

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

.close-modal {
    color: var(--gray-text);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
}

#modal-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-right: 3rem;
}

.modal-gallery {
    position: relative;
    max-width: 900px;
    margin: 2rem auto;
    background: var(--dark-bg);
    border-radius: 10px;
    overflow: hidden;
}

.gallery-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item.active {
    opacity: 1;
    z-index: 1;
}

.gallery-item video,
.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-size: 2rem;
    z-index: 2;
}

.gallery-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-text);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(108, 92, 231, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
}

.gallery-nav:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.gallery-counter {
    text-align: center;
    padding: 10px;
    color: var(--gray-text);
    font-size: 0.9rem;
    background: var(--darker-bg);
}

#modal-description {
    color: var(--gray-text);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 0 10px 10px 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--hover-color);
}

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .language-switcher {
        margin-left: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2rem;
    }
    
    .modal-gallery {
        max-width: 100%;
        margin: 1rem auto;
    }
    
    .gallery-container {
        aspect-ratio: 4/3;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        padding: 0;
    }
    
    .gallery-nav.prev {
        left: 5px;
    }
    
    .gallery-nav.next {
        right: 5px;
    }
    
    #modal-title {
        font-size: 1.4rem;
        padding-right: 2.5rem;
        margin-bottom: 1rem;
    }
    
    #modal-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .gallery-counter {
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }
}
