@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #888;
    --glow-color: rgba(187, 134, 252, 0.5);
    --glow-secondary: rgba(3, 218, 198, 0.4);
    --surface-gradient: linear-gradient(145deg, rgba(30, 30, 30, 0.7), rgba(18, 18, 18, 0.5));
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    background-image: radial-gradient(circle at 1% 1%, rgba(187, 134, 252, 0.08), transparent 30%);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

.site-header {
    position: sticky;
    top: 0;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content .logo h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
}

.header-content .logo a {
    text-decoration: none;
    color: inherit;
}

.header-content .logo .game-count-badge {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: #c9c9c9;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.filter-controls {
    display: flex;
    gap: 20px;
    background: var(--surface-gradient);
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-muted);
}

.filter-group i {
    color: var(--primary-color);
}

.filter-group select,
.filter-group input[type="text"] {
    background-color: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.filter-group input[type="text"] {
    min-width: 280px;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px -2px var(--glow-color);
}

.game-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.game-card-wrapper {
    position: relative;
}

.game-card {
    display: block;
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    aspect-ratio: 4 / 5;
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: conic-gradient(from 180deg at 50% 50%, var(--primary-color), var(--secondary-color), var(--primary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.game-card-wrapper:hover .game-card::before {
    opacity: 1;
}

.game-card-wrapper:hover .game-card {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.game-card .img-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.game-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card-wrapper:hover .game-card img {
    transform: scale(1.08);
}

.game-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 20%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    min-height: 50%;
}

.game-info h3 {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.game-category {
    background-color: var(--primary-color);
    color: #121212;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorite-btn.on-card {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background-color: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(5px);
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.favorite-btn.on-card:hover {
    background-color: rgba(30, 30, 30, 0.9);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    padding: 12px 28px;
    background: linear-gradient(90deg, var(--secondary-color), #32fbe7);
    color: #121212;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--glow-secondary);
}

.page-title-container {
    text-align: center;
    margin: 1rem 0 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-title-container h2 {
    font-size: 2.2rem;
}

.game-detail-container {
    display: flex;
    background: var(--surface-gradient);
    padding: 2.5rem;
    border-radius: 16px;
    margin-top: 1rem;
    gap: 2.5rem;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-detail-image {
    flex: 1;
    min-width: 300px;
}

.game-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-detail-info {
    flex: 2;
    min-width: 300px;
}

.game-detail-info h1 {
    margin-top: 0;
    font-size: 2.8rem;
    line-height: 1.2;
}

.game-detail-info p {
    font-size: 1rem;
    line-height: 1.7;
    color: #ccc;
    white-space: pre-wrap;
    margin-top: 1rem;
}

.actions-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.favorite-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

.favorite-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
}

.favorite-btn.favorited {
    background-color: var(--primary-color);
    color: #121212;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px var(--glow-color);
}

.favorite-btn.favorited:hover {
    background-color: #d7aaff;
}

.skeleton-loader {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

@keyframes pulse {
    50% { opacity: 0.6; }
}

.skeleton-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    animation: pulse 1.5s infinite ease-in-out;
    aspect-ratio: 4 / 5;
}

.info-message,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2em;
    color: var(--text-muted);
    padding: 40px;
}

.error-message {
    color: var(--primary-color);
}

.auth-container {
    max-width: 450px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--surface-gradient);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.auth-form input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--background-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px -2px var(--glow-color);
}

.auth-form button {
    width: 100%;
    margin-top: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-errors {
    background-color: rgba(252, 82, 82, 0.1);
    border: 1px solid rgba(252, 82, 82, 0.5);
    color: #fc5252;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.auth-success {
    background-color: rgba(3, 218, 198, 0.1);
    border: 1px solid rgba(3, 218, 198, 0.5);
    color: var(--secondary-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.nav-welcome {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .game-detail-container {
        flex-direction: column;
        padding: 1.5rem;
    }
    .game-detail-info h1 {
        font-size: 2rem;
    }
}

.verification-box {
    background-color: var(--background-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.verification-box label {
    margin-bottom: 1rem !important;
}

.verification-instruction {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.verification-challenge {
    background-color: rgba(0, 0, 0, 0.2);
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    text-align: center;
    padding: 20px 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 4px;
    user-select: none;
    text-shadow: 0 0 10px var(--glow-color);
    transform: skewX(-8deg);
}
.chat-attach-btn{background:none;border:none;color:var(--text-muted);font-size:1.2rem;cursor:pointer;padding:12px;transition:color .2s ease}.chat-attach-btn:hover{color:var(--primary-color)}.image-preview-container{display:flex;align-items:center;gap:10px;padding:10px;background:rgba(0,0,0,0.2);border-top:1px solid rgba(255,255,255,0.1)}.image-preview-container img{max-height:50px;max-width:100px;border-radius:4px}.remove-image-btn{background:rgba(255,0,0,0.7);color:white;border:none;border-radius:50%;width:20px;height:20px;cursor:pointer;line-height:20px;text-align:center}.chat-image{max-width:100%;max-height:300px;border-radius:8px;margin-top:5px;cursor:pointer;border:1px solid rgba(255,255,255,0.1)}
.nav-profile-link{display:flex;align-items:center;gap:10px;padding:5px 10px;border-radius:25px;background:var(--surface-color);transition:background-color .2s ease}.nav-profile-link:hover{background-color:#2a2a2a}.nav-avatar{width:30px;height:30px;border-radius:50%;overflow:hidden;background-color:var(--primary-color);color:#121212;display:flex;align-items:center;justify-content:center}.nav-avatar img{width:100%;height:100%;object-fit:cover}.nav-profile-link span{font-weight:600}.profile-container{max-width:800px;margin:2rem auto}.profile-card{padding:2rem}.profile-header{display:flex;align-items:center;gap:2rem;padding-bottom:2rem;border-bottom:1px solid rgba(255,255,255,0.1)}.profile-avatar-large{width:120px;height:120px;border-radius:50%;background-color:var(--surface-color);border:3px solid var(--primary-color);display:flex;align-items:center;justify-content:center;font-size:4rem;overflow:hidden}.profile-avatar-large img{width:100%;height:100%;object-fit:cover}.profile-username{font-size:2.2rem;margin:0}.profile-email{color:var(--text-muted)}.profile-joined{font-size:.9rem;color:var(--text-muted)}.profile-upload-section{margin-top:2rem;text-align:center}.profile-upload-section h4{font-size:1.3rem;margin-bottom:.5rem}.profile-upload-section p{font-size:.9rem;color:var(--text-muted);margin-bottom:1.5rem}.file-input{display:none}.file-input-label{display:inline-block;padding:10px 20px;background:rgba(255,255,255,0.1);border:1px dashed rgba(255,255,255,0.2);border-radius:8px;cursor:pointer;margin-bottom:1rem;transition:all .2s ease}.file-input-label:hover{background:rgba(255,255,255,0.2);border-color:var(--primary-color)}.message{padding:1rem;border-radius:8px;text-align:center;font-weight:600}.message.success{background-color:rgba(3,218,198,0.1);color:var(--secondary-color)}


.chat-container{background:var(--surface-color);border:1px solid rgba(255,255,255,0.1);border-radius:12px;display:flex;flex-direction:column;height:75vh;margin-top:2rem}.chat-box{flex-grow:1;overflow-y:auto;padding:1.5rem;display:flex;flex-direction:column;gap:1.5rem}.chat-loading-spinner{border:4px solid rgba(255,255,255,0.1);border-left-color:var(--primary-color);border-radius:50%;width:40px;height:40px;animation:spin 1s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}.chat-message{display:flex;gap:15px}.chat-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;background-color:#333;overflow:hidden;display:flex;align-items:center;justify-content:center}.chat-avatar img{width:100%;height:100%;object-fit:cover}.chat-message-header{display:flex;align-items:baseline;gap:10px;margin-bottom:5px}.chat-username{font-weight:700;color:var(--primary-color)}.chat-timestamp{font-size:0.75rem;color:var(--text-muted)}.chat-message-body{line-height:1.5;word-wrap:break-word}.chat-form{display:flex;gap:10px;padding:1rem;border-top:1px solid rgba(255,255,255,0.1)}.chat-form input{flex-grow:1;background-color:var(--background-color);border:1px solid rgba(255,255,255,0.1);border-radius:8px;padding:12px 15px;color:var(--text-color);font-family:'Poppins',sans-serif;font-size:1rem}.chat-form input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 10px -2px var(--glow-color)}.chat-form button{width:50px;height:50px;padding:0;border-radius:8px}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .game-detail-container {
        flex-direction: column;
        padding: 1.5rem;
    }
    .game-detail-info h1 {
        font-size: 2rem;
    }
    /* --- NEW CHAT RESPONSIVE STYLES --- */
    .chat-container {
        /* Make the chat take up more vertical space on mobile */
        height: 85vh;
        border-radius: 0;
        margin: 1rem -20px -20px -20px; /* Stretch to screen edges */
        border: none;
    }
    .chat-box {
        padding: 1rem;
    }
    .chat-form {
        padding: 0.75rem;
    }
}

/* --- RESPONSIVE HEADER & HAMBURGER MENU --- */
.nav-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 992px) {
    .nav-toggle-btn {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(18, 18, 18, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        z-index: 1000;
    }

    .main-nav.mobile-active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .main-nav ul a {
        font-size: 2rem;
        font-weight: 700;
        padding: 1rem;
        display: block;
    }

    .nav-toggle-btn.close-btn {
        display: block;
        position: absolute;
        top: 2rem;
        right: 2rem;
        font-size: 2.5rem;
    }
    
    .nav-profile-link {
        flex-direction: column;
        gap: 1rem;
        background: transparent !important;
    }
    .nav-profile-link:hover {
        background: transparent !important;
    }
    .nav-profile-link .nav-avatar {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    .nav-profile-link span {
        font-size: 2rem;
    }
}
/* --- NEW: Dragon Fire Animation for Author --- */

@keyframes fire-border-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.author-message {
    background-color: rgba(255, 100, 0, 0.05); /* Faint orange background glow */
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    position: relative;
}

.author-message::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px;
    right: -2px; bottom: -2px;
    border-radius: 8px;
    background: linear-gradient(90deg, #ff8c00, #ff4500, #ffd700, #ff4500, #ff8c00);
    background-size: 400% 400%;
    animation: fire-border-animation 8s ease infinite;
    z-index: -1;
}

.author-message .chat-avatar {
    border: 2px solid #ff8c00;
}
.author-badge{background:var(--primary-color);color:#121212;padding:2px 8px;border-radius:10px;font-size:.7rem;font-weight:700;margin-left:8px;vertical-align:middle}.author-badge i{margin-right:4px}.author-profile-tag{display:inline-block;background:var(--primary-color);color:#121212;padding:5px 12px;border-radius:20px;font-size:.9rem;font-weight:600;margin-top:5px;margin-bottom:10px}.author-profile-tag i{margin-right:6px}
.top-user-badge{color:#FFD700;margin-left:5px;font-size:.8em}.leaderboard-top-three{display:flex;justify-content:center;align-items:flex-end;gap:1.5rem;margin-top:2rem;margin-bottom:3rem}.leaderboard-card{background:var(--surface-gradient);border:1px solid rgba(255,255,255,0.1);border-radius:12px;padding:1.5rem;text-align:center;width:220px;position:relative;transition:transform .3s ease}.leaderboard-card.rank-2{transform:translateY(20px)}.leaderboard-card.rank-3{transform:translateY(20px)}.leaderboard-card.rank-1{width:250px;padding:2rem;z-index:10}.leaderboard-avatar{width:100px;height:100px;border-radius:50%;margin:0 auto 1rem;background-color:var(--background-color);display:flex;align-items:center;justify-content:center;overflow:hidden;border:3px solid transparent;font-size:3rem}.leaderboard-card.rank-1 .leaderboard-avatar{width:120px;height:120px;border-color:#FFD700}.leaderboard-card.rank-2 .leaderboard-avatar{border-color:#C0C0C0}.leaderboard-card.rank-3 .leaderboard-avatar{border-color:#CD7F32}.leaderboard-avatar img{width:100%;height:100%;object-fit:cover}.leaderboard-card h3{font-size:1.4rem;margin-bottom:.25rem}.leaderboard-card p{color:var(--text-muted)}.rank-badge{position:absolute;top:-15px;left:50%;transform:translateX(-50%);background-color:#121212;color:#fff;border-radius:50%;width:40px;height:40px;display:flex;align-items:center;justify-content:center;font-size:1.1rem;font-weight:700;border:2px solid}.rank-badge i{margin-right:4px}.rank-1 .rank-badge{background-color:#FFD700;color:#121212;border-color:#fff}.rank-2 .rank-badge{background-color:#C0C0C0;color:#121212;border-color:#fff}.rank-3 .rank-badge{background-color:#CD7F32;color:#fff;border-color:#121212}.leaderboard-list{max-width:800px;margin:2rem auto 0}.leaderboard-list-item{display:flex;align-items:center;gap:1rem;background-color:var(--surface-color);padding:1rem 1.5rem;border-radius:8px;margin-bottom:1rem;transition:background-color .2s ease}.leaderboard-list-item:hover{background-color:rgba(255,255,255,0.05)}.list-rank{font-size:1.2rem;font-weight:700;color:var(--text-muted);width:40px}.list-user-info{display:flex;align-items:center;gap:1rem;flex-grow:1}.leaderboard-avatar.small{width:40px;height:40px}.list-message-count{font-weight:600;color:var(--secondary-color)}@media(max-width:768px){.leaderboard-top-three{flex-direction:column;align-items:center;gap:3rem}.leaderboard-card.rank-2,.leaderboard-card.rank-3{transform:translateY(0)}}


/* ================================ */
/*  Kurdish Flag Animation Styles   */
/* ================================ */

/* The main banner container */
.kurdish-flag-banner {
    position: relative;
    width: 100%;
    height: 10px; /* Starts thin */
    overflow: hidden;
    background-color: #f0f0f0;
    transition: height 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Animate height with a bounce effect */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The state after animation is triggered */
.kurdish-flag-banner.visible {
    height: 120px; /* Expands to this height */
}

/* Container for the three color stripes */
.flag-stripes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stripe {
    width: 100%;
    height: 33.333%;
}

.stripe.red { background-color: #ED2939; }
.stripe.white { background-color: #FFFFFF; }
.stripe.green { background-color: #00A551; }

/* The Sun Emblem */
.sun {
    position: relative;
    width: 70px; /* Size of the sun's circle */
    height: 70px;
    background-color: #FEBD17;
    border-radius: 50%;
    transform: scale(0); /* Starts invisible */
    opacity: 0;
    transition: transform 0.6s ease-out 0.5s, opacity 0.6s ease-out 0.5s; /* Delay animation */
}

.kurdish-flag-banner.visible .sun {
    transform: scale(1); /* Sun scales into view */
    opacity: 1;
}

/* The Sun's Rays */
.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 55px; /* Length of the rays */
    height: 12px; /* Thickness of the rays */
    background: #FEBD17;
    transform-origin: 0% 50%; /* Pivot point is the base of the ray */
    clip-path: polygon(0 0, 100% 50%, 0 100%); /* Creates a triangle shape */
    transform: translateY(-50%) scaleX(0); /* Start scaled to 0 width */
    transition: transform 0.5s ease-in-out;
}

/* Animate rays when the banner is visible */
.kurdish-flag-banner.visible .ray {
    transform: translateY(-50%) scaleX(1); /* Rays shoot outwards */
}

/* Position and delay each of the 21 rays around the sun */
.ray:nth-child(1) { transform: translateY(-50%) scaleX(0) rotate(0deg); transition-delay: 0.8s; }
.ray:nth-child(2) { transform: translateY(-50%) scaleX(0) rotate(17.14deg); transition-delay: 0.82s; }
.ray:nth-child(3) { transform: translateY(-50%) scaleX(0) rotate(34.28deg); transition-delay: 0.84s; }
.ray:nth-child(4) { transform: translateY(-50%) scaleX(0) rotate(51.42deg); transition-delay: 0.86s; }
.ray:nth-child(5) { transform: translateY(-50%) scaleX(0) rotate(68.56deg); transition-delay: 0.88s; }
.ray:nth-child(6) { transform: translateY(-50%) scaleX(0) rotate(85.7deg); transition-delay: 0.9s; }
.ray:nth-child(7) { transform: translateY(-50%) scaleX(0) rotate(102.84deg); transition-delay: 0.92s; }
.ray:nth-child(8) { transform: translateY(-50%) scaleX(0) rotate(120deg); transition-delay: 0.94s; }
.ray:nth-child(9) { transform: translateY(-50%) scaleX(0) rotate(137.14deg); transition-delay: 0.96s; }
.ray:nth-child(10) { transform: translateY(-50%) scaleX(0) rotate(154.28deg); transition-delay: 0.98s; }
.ray:nth-child(11) { transform: translateY(-50%) scaleX(0) rotate(171.42deg); transition-delay: 1s; }
.ray:nth-child(12) { transform: translateY(-50%) scaleX(0) rotate(188.56deg); transition-delay: 1.02s; }
.ray:nth-child(13) { transform: translateY(-50%) scaleX(0) rotate(205.7deg); transition-delay: 1.04s; }
.ray:nth-child(14) { transform: translateY(-50%) scaleX(0) rotate(222.84deg); transition-delay: 1.06s; }
.ray:nth-child(15) { transform: translateY(-50%) scaleX(0) rotate(240deg); transition-delay: 1.08s; }
.ray:nth-child(16) { transform: translateY(-50%) scaleX(0) rotate(257.14deg); transition-delay: 1.1s; }
.ray:nth-child(17) { transform: translateY(-50%) scaleX(0) rotate(274.28deg); transition-delay: 1.12s; }
.ray:nth-child(18) { transform: translateY(-50%) scaleX(0) rotate(291.42deg); transition-delay: 1.14s; }
.ray:nth-child(19) { transform: translateY(-50%) scaleX(0) rotate(308.56deg); transition-delay: 1.16s; }
.ray:nth-child(20) { transform: translateY(-50%) scaleX(0) rotate(325.7deg); transition-delay: 1.18s; }
.ray:nth-child(21) { transform: translateY(-50%) scaleX(0) rotate(342.84deg); transition-delay: 1.2s; }

/* Set the final state for the rays when the banner is visible */
.kurdish-flag-banner.visible .ray:nth-child(1) { transform: translateY(-50%) scaleX(1) rotate(0deg); }
.kurdish-flag-banner.visible .ray:nth-child(2) { transform: translateY(-50%) scaleX(1) rotate(17.14deg); }
.kurdish-flag-banner.visible .ray:nth-child(3) { transform: translateY(-50%) scaleX(1) rotate(34.28deg); }
.kurdish-flag-banner.visible .ray:nth-child(4) { transform: translateY(-50%) scaleX(1) rotate(51.42deg); }
.kurdish-flag-banner.visible .ray:nth-child(5) { transform: translateY(-50%) scaleX(1) rotate(68.56deg); }
.kurdish-flag-banner.visible .ray:nth-child(6) { transform: translateY(-50%) scaleX(1) rotate(85.7deg); }
.kurdish-flag-banner.visible .ray:nth-child(7) { transform: translateY(-50%) scaleX(1) rotate(102.84deg); }
.kurdish-flag-banner.visible .ray:nth-child(8) { transform: translateY(-50%) scaleX(1) rotate(120deg); }
.kurdish-flag-banner.visible .ray:nth-child(9) { transform: translateY(-50%) scaleX(1) rotate(137.14deg); }
.kurdish-flag-banner.visible .ray:nth-child(10) { transform: translateY(-50%) scaleX(1) rotate(154.28deg); }
.kurdish-flag-banner.visible .ray:nth-child(11) { transform: translateY(-50%) scaleX(1) rotate(171.42deg); }
.kurdish-flag-banner.visible .ray:nth-child(12) { transform: translateY(-50%) scaleX(1) rotate(188.56deg); }
.kurdish-flag-banner.visible .ray:nth-child(13) { transform: translateY(-50%) scaleX(1) rotate(205.7deg); }
.kurdish-flag-banner.visible .ray:nth-child(14) { transform: translateY(-50%) scaleX(1) rotate(222.84deg); }
.kurdish-flag-banner.visible .ray:nth-child(15) { transform: translateY(-50%) scaleX(1) rotate(240deg); }
.kurdish-flag-banner.visible .ray:nth-child(16) { transform: translateY(-50%) scaleX(1) rotate(257.14deg); }
.kurdish-flag-banner.visible .ray:nth-child(17) { transform: translateY(-50%) scaleX(1) rotate(274.28deg); }
.kurdish-flag-banner.visible .ray:nth-child(18) { transform: translateY(-50%) scaleX(1) rotate(291.42deg); }
.kurdish-flag-banner.visible .ray:nth-child(19) { transform: translateY(-50%) scaleX(1) rotate(308.56deg); }
.kurdish-flag-banner.visible .ray:nth-child(20) { transform: translateY(-50%) scaleX(1) rotate(325.7deg); }
.kurdish-flag-banner.visible .ray:nth-child(21) { transform: translateY(-50%) scaleX(1) rotate(342.84deg); }