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

 body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #0c0c0c 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
 }

 /* Header */
 .header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 50%, #ff3838 100%);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
 }

 .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
 }

 .header h1 {
    font-size: 3.5em;
    font-weight: bold;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7);
    margin-bottom: 10px;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
 }

 .header p {
    font-size: 1.3em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
 }

 /* Stats */
 .stats {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    margin: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
 }

 .stats h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #ff6b6b;
 }

 .stats p {
    font-size: 1.1em;
    opacity: 0.8;
 }

 /* Gallery Container */
 .gallery-container {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
 }

 /* Filter Controls */
 .filter-controls {
    text-align: center;
    margin-bottom: 40px;
 }

 .filter-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 5px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
 }

 .filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
 }

 .filter-btn.active {
    background: linear-gradient(135deg, #2ed573, #1e90ff);
    box-shadow: 0 5px 15px rgba(46, 213, 115, 0.3);
 }

 /* Gallery Grid */
 .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
 }

 .gallery-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
 }

 .gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.3);
    border-color: #ff6b6b;
 }

 .gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
 }

 .gallery-item:hover img {
    transform: scale(1.1);
 }

 .gallery-item-info {
    padding: 15px;
    text-align: center;
 }

 .gallery-item-info h3 {
    font-size: 1.2em;
    margin-bottom: 8px;
    color: #ff6b6b;
 }

 .gallery-item-info p {
    opacity: 0.7;
    font-size: 0.9em;
 }

 .download-btn {
    background: linear-gradient(135deg, #2ed573, #1e90ff);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(46, 213, 115, 0.3);
 }

 .download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 213, 115, 0.4);
 }

 /* Modal */
 .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
 }

 .modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
 }

 .modal img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(255, 107, 107, 0.5);
 }

 .modal-info {
    text-align: center;
    margin-top: 20px;
    color: white;
 }

 .modal-info h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #ff6b6b;
 }

 .modal-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
 }

 .modal-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
 }

 .modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
 }

 .modal-btn.download {
    background: linear-gradient(135deg, #2ed573, #1e90ff);
    box-shadow: 0 5px 15px rgba(46, 213, 115, 0.3);
 }

 .modal-btn.download:hover {
    box-shadow: 0 8px 25px rgba(46, 213, 115, 0.4);
 }

 .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
 }

 .close:hover {
    color: #ff6b6b;
    transform: scale(1.2);
 }

 /* Navigation arrows */
 .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 107, 107, 0.8);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
 }

 .nav-arrow:hover {
    background: rgba(255, 107, 107, 1);
    transform: translateY(-50%) scale(1.1);
 }

 .nav-arrow.prev {
    left: 30px;
 }

 .nav-arrow.next {
    right: 30px;
 }

 /* Loading Animation */
 .loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #ff6b6b;
 }

 .loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 107, 107, 0.3);
    border-radius: 50%;
    border-top-color: #ff6b6b;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
 }

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

 /* Responsive Design */
 @media (max-width: 768px) {
    .header h1 {
       font-size: 2.5em;
    }

    .gallery {
       grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
       gap: 15px;
    }

    .modal-content {
       padding: 10px;
    }

    .nav-arrow {
       width: 50px;
       height: 50px;
       font-size: 20px;
    }

    .nav-arrow.prev {
       left: 15px;
    }

    .nav-arrow.next {
       right: 15px;
    }

    .modal-controls {
       flex-direction: column;
       align-items: center;
    }
 }

 /* Scroll to top button */
 .scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    z-index: 100;
 }

 .scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
 }

 .scroll-top.show {
    display: block;
    animation: fadeInUp 0.5s ease;
 }

 @keyframes fadeInUp {
    from {
       opacity: 0;
       transform: translateY(30px);
    }

    to {
       opacity: 1;
       transform: translateY(0);
    }
 }

 /* Load More Button */
 .load-more-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
 }

 .load-more-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
 }

 .load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ee5a24, #ff3838);
 }

 /* Game button styling for main page */
 .game-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad) !important;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3) !important;
 }

 .game-btn:hover {
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4) !important;
 }

 /* Game Page Styles */
 .navigation {
    padding: 20px;
    text-align: center;
 }

 .nav-btn {
    background: linear-gradient(135deg, #2ed573, #1e90ff);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(46, 213, 115, 0.3);
    display: inline-block;
 }

 .nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 213, 115, 0.4);
 }

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

 .game-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
 }

 .game-content h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #ff6b6b;
 }

 .game-area {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 60px 20px;
    margin: 30px 0;
    border: 2px dashed rgba(255, 107, 107, 0.3);
 }

 .game-placeholder h3 {
    color: #ff6b6b;
    font-size: 2em;
    margin-bottom: 15px;
 }

 .game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
 }

 .game-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
 }

 .game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
 }

 .footer {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.7;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
 }

 /* Game button styling for main page */
 .game-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad) !important;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3) !important;
 }

 .game-btn:hover {
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4) !important;
 }

 /* Snake Game Specific Styles */
 .snake-game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
 }

 .game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
 }

 .score-board {
    display: flex;
    gap: 30px;
    font-size: 1.2em;
    font-weight: bold;
 }

 .score-board span {
    color: #ff6b6b;
 }

 .game-status {
    font-size: 1.1em;
    font-weight: bold;
    color: #ffffff;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.3);
 }

 #gameCanvas {
    border: 3px solid #ff6b6b;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
 }

 .game-instructions {
    text-align: center;
    margin-top: 15px;
    opacity: 0.8;
 }

 .game-instructions p {
    margin: 5px 0;
    font-size: 0.9em;
 }

 /* Responsive design for game */
 @media (max-width: 768px) {
    #gameCanvas {
       width: 300px;
       height: 300px;
    }

    .score-board {
       flex-direction: column;
       gap: 10px;
       text-align: center;
    }

    .game-controls {
       flex-direction: column;
       align-items: center;
    }
 }