* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
a {
    text-decoration: none;
  }

body {
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
}

/* Banner Section */
.banner {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 3px solid #ABFF2F;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(171, 255, 47, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.banner-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.banner h1 {
    font-size: 4rem;
    font-weight: bold;
    color: #ABFF2F;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(171, 255, 47, 0.5);
}

.banner p {
    font-size: 1.5rem;
    color: #cccccc;
    margin-bottom: 2rem;
}

.banner-highlight {
    display: inline-block;
    background: #ABFF2F;
    color: #000000;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0 10px;
}

/* Main Content */
.main-content {
    padding: 3rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.game-card {
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    border-color: #ABFF2F;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(171, 255, 47, 0.2);
}

.game-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #333333;
}

.game-card-content {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ABFF2F;
    margin-bottom: 0.8rem;
    text-transform: capitalize;
}

.game-description {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    /* -webkit-line-clamp: 3; */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-author {
    color: #888888;
    font-size: 0.8rem;
    text-align: right;
}

.game-author::before {
    content: "by ";
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 2% auto;
    border: 2px solid #ABFF2F;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 96vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ABFF2F;
    color: #ABFF2F;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #ABFF2F;
    color: #000000;
}

.close-btn:hover {
    background: #ff4444;
    border-color: #ff4444;
    color: #ffffff;
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.game-frame-container {
    position: relative;
    width: 100%;
    flex: 1;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

#gameFrame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gameFrame iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

/* Floating Info Panel */
.floating-info-panel {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1002;
    max-width: 350px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #ABFF2F;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.info-toggle-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ABFF2F;
    color: #ABFF2F;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.info-toggle-btn:hover {
    background: #ABFF2F;
    color: #000000;
}

.info-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.floating-info-panel.collapsed .info-content {
    display: none;
}

.floating-info-panel.collapsed {
    background: transparent;
    border: none;
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    color: #ABFF2F;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #333333;
    padding-bottom: 0.3rem;
}

.info-section p {
    color: #cccccc;
    line-height: 1.5;
    font-size: 0.9rem;
}

#gameControls {
    color: #cccccc;
    white-space: pre-line;
    font-family: 'Courier New', monospace;
    background: rgba(26, 26, 26, 0.8);
    padding: 0.8rem;
    border-radius: 6px;
    border-left: 3px solid #ABFF2F;
    font-size: 0.8rem;
    line-height: 1.4;
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.meta-label {
    color: #ABFF2F;
    font-weight: bold;
    min-width: 60px;
}

#gameAuthor {
    color: #cccccc;
}

#gameSource {
    color: #ABFF2F;
    text-decoration: none;
    transition: color 0.3s ease;
}

#gameSource:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Custom scrollbar for info content */
.info-content::-webkit-scrollbar {
    width: 6px;
}

.info-content::-webkit-scrollbar-track {
    background: rgba(51, 51, 51, 0.5);
    border-radius: 3px;
}

.info-content::-webkit-scrollbar-thumb {
    background: #ABFF2F;
    border-radius: 3px;
}

.info-content::-webkit-scrollbar-thumb:hover {
    background: #8FE01F;
}

/* Iframe Loading and Error States */
.iframe-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ABFF2F;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #333333;
    border-top: 4px solid #ABFF2F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.iframe-loading p {
    font-size: 1.1rem;
    margin: 0;
}

.iframe-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #000000;
}

.fallback-content {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.fallback-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.fallback-content h3 {
    color: #ABFF2F;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.fallback-content p {
    color: #cccccc;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.fallback-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fallback-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.fallback-btn.primary {
    background: #ABFF2F;
    color: #000000;
}

.fallback-btn.primary:hover {
    background: #8FE01F;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(171, 255, 47, 0.3);
}

.fallback-btn.secondary {
    background: transparent;
    color: #ABFF2F;
    border: 2px solid #ABFF2F;
}

.fallback-btn.secondary:hover {
    background: #ABFF2F;
    color: #000000;
    transform: translateY(-2px);
}

.fallback-note {
    color: #888888;
    font-size: 0.9rem;
}

.fallback-note small {
    opacity: 0.8;
}

/* Game Info Page Styles */
.game-info-page {
    width: 100%;
    height: 100%;
    background: #000000;
    overflow-y: auto;
    padding: 20px;
}

/* Custom scrollbar for game info page */
.game-info-page::-webkit-scrollbar {
    width: 8px;
}

.game-info-page::-webkit-scrollbar-track {
    background: rgba(51, 51, 51, 0.5);
    border-radius: 4px;
}

.game-info-page::-webkit-scrollbar-thumb {
    background: #ABFF2F;
    border-radius: 4px;
}

.game-info-page::-webkit-scrollbar-thumb:hover {
    background: #8FE01F;
}

.info-page-content {
    display: flex;
    gap: 3rem;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    align-items: stretch;
    height: 100%;
}

.game-cover-large {
    flex-shrink: 0;
    width: 300px;
    align-self: flex-start;
}

.game-cover-large img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    /* border: 2px solid #ABFF2F; */
    box-shadow: 0 10px 30px rgba(171, 255, 47, 0.2);
}

.game-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.game-details-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom scrollbar for game details */
.game-details::-webkit-scrollbar {
    width: 6px;
}

.game-details::-webkit-scrollbar-track {
    background: rgba(51, 51, 51, 0.5);
    border-radius: 3px;
}

.game-details::-webkit-scrollbar-thumb {
    background: #ABFF2F;
    border-radius: 3px;
}

.game-details::-webkit-scrollbar-thumb:hover {
    background: #8FE01F;
}

.game-title-large {
    font-size: 2.5rem;
    color: #ABFF2F;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(171, 255, 47, 0.3);
}

.game-author-large {
    font-size: 1.2rem;
    color: #888888;
    margin-bottom: 2rem;
}

.play-button-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.play-game-btn {
    background: #ABFF2F;
    color: #000000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(171, 255, 47, 0.3);
}

.play-game-btn:hover {
    background: #8FE01F;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(171, 255, 47, 0.4);
}

.play-icon {
    font-size: 1.4rem;
}

.view-source-btn {
    background: transparent;
    color: #ABFF2F;
    border: 2px solid #ABFF2F;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-source-btn:hover {
    background: #ABFF2F;
    color: #000000;
    transform: translateY(-3px);
}

.game-description-large {
    margin-bottom: 2rem;
}

.game-description-large h3 {
    color: #ABFF2F;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #333333;
    padding-bottom: 0.5rem;
}

.game-description-large p {
    color: #cccccc;
    line-height: 1.7;
    font-size: 1rem;
}

.game-controls-large h3 {
    color: #ABFF2F;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #333333;
    padding-bottom: 0.5rem;
}

.controls-text {
    color: #cccccc;
    white-space: pre-line;
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ABFF2F;
    font-size: 0.9rem;
    line-height: 1.5;
}

.game-meta-large {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #333333;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-row:last-child {
    margin-bottom: 0;
}

.meta-label-large {
    color: #ABFF2F;
    font-weight: bold;
    font-size: 1rem;
    min-width: 80px;
}

.footer p{
    text-align: center;
}
.footer{
    padding: 10px 0;
    background-color: #ABFF2F;
    color: #000;
}

.meta-value-large {
    color: #cccccc;
    font-size: 1rem;
}

.meta-link-large {
    color: #ABFF2F;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.meta-link-large:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Responsive Design for Info Page */
@media (max-width: 900px) {
    .info-page-content {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        text-align: center;
    }
    
    .game-cover-large {
        width: 250px;
    }
    
    .game-title-large {
        font-size: 2rem;
    }
    
    .play-button-container {
        flex-direction: column;
        align-items: center;
    }
    
    .play-game-btn,
    .view-source-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .game-info-page {
        padding: 1rem;
        height: 100vh;
    }
    
    .game-cover-large {
        width: 100%;
    }
    
    .game-title-large {
        font-size: 1.8rem;
    }
    
    .game-author-large {
        font-size: 1rem;
    }
    
    .play-game-btn,
    .view-source-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner h1 {
        font-size: 3rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1% auto;
    }
    
    .game-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .banner {
        padding: 2rem 1rem;
    }
    
    .banner h1 {
        font-size: 2.5rem;
    }
    
    .banner p {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .game-info {
        padding: 1rem;
    }

    .banner-highlight {
        width: 300px;
        margin: 10px;
    }
    .banner-content img{
        width: 60vw;
    }
}