/* ============================================
   GOLDEN CUP — OVERLAY STİLLERİ
   ============================================ */

/* Overlay Container */
.draw-overlay {
    position: absolute;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.draw-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

/* Backdrop */
.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.6s ease;
}

.draw-overlay.active .overlay-backdrop {
    background: rgba(0, 0, 0, 0.82);
}

/* Card */
.overlay-card {
    position: relative;
    z-index: 901;
    background: linear-gradient(
        160deg,
        rgba(26, 58, 42, 0.92) 0%,
        rgba(13, 26, 18, 0.95) 50%,
        rgba(26, 58, 42, 0.92) 100%
    );
    backdrop-filter: blur(30px) saturate(1.2);
    -webkit-backdrop-filter: blur(30px) saturate(1.2);
    border: 2px solid var(--gold, #D4AF37);
    border-radius: 28px;
    padding: 40px 70px 50px;
    text-align: center;
    min-width: 380px;
    box-shadow:
        0 0 50px rgba(212, 175, 55, 0.25),
        0 0 100px rgba(212, 175, 55, 0.08),
        0 25px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(0.7) translateY(20px);
    opacity: 0;
    transition:
        transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.35s ease;
}

.draw-overlay.active .overlay-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Corner Decorations */
.overlay-card::before,
.overlay-card::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid var(--gold-dark, #8B7536);
    opacity: 0.4;
}

.overlay-card::before {
    top: 12px;
    left: 12px;
    border-right: none;
    border-bottom: none;
    border-radius: 8px 0 0 0;
}

.overlay-card::after {
    bottom: 12px;
    right: 12px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 8px 0;
}

/* Letter Label */
.overlay-letter-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted, #7a9a8e);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease 0.3s;
}

.draw-overlay.active .overlay-letter-label {
    opacity: 1;
    transform: translateY(0);
}

/* Letter */
.overlay-letter {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 9rem;
    line-height: 1;
    background: linear-gradient(
        180deg,
        #FFE87C 0%,
        #FFD700 25%,
        #D4AF37 55%,
        #B8960C 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.5));
    opacity: 0;
    transform: scale(0.5) rotateY(90deg);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}

.overlay-letter.revealed {
    opacity: 1;
    transform: scale(1) rotateY(0);
    animation: letterGlow 1.5s ease-in-out infinite 0.8s;
}

@keyframes letterGlow {
    0%, 100% {
        filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.5));
    }
    50% {
        filter: drop-shadow(0 4px 25px rgba(255, 215, 0, 0.8))
               drop-shadow(0 0 40px rgba(255, 215, 0, 0.3));
    }
}

/* Divider */
.overlay-divider {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold, #D4AF37), transparent);
    margin: 20px auto;
    transition: width 0.5s ease;
    opacity: 0;
}

.overlay-divider.visible {
    width: 80%;
    opacity: 1;
}

/* Team Section */
.overlay-team {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay-team.revealed {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Team Logo */
.overlay-team-logo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3px solid var(--gold, #D4AF37);
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    box-shadow:
        0 0 30px rgba(212, 175, 55, 0.35),
        0 0 60px rgba(212, 175, 55, 0.1);
    animation: logoSpin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logoSpin {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.overlay-team-logo.no-logo {
    display: none;
}

/* Team Name */
.overlay-team-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.8rem;
    color: #ffffff;
    letter-spacing: 5px;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(212, 175, 55, 0.2);
    animation: nameSlideUp 0.5s ease 0.3s both;
}

@keyframes nameSlideUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ====== CLOSING STATE ====== */
.draw-overlay.closing {
    transition: opacity 0.5s ease;
}

.draw-overlay.closing .overlay-card {
    transform: scale(0.85) translateY(-20px);
    opacity: 0;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}

.draw-overlay.closing .overlay-backdrop {
    background: rgba(0, 0, 0, 0);
    transition: background 0.5s ease;
}

/* ====== PARTICLES (decorative) ====== */
.overlay-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold-light, #FFD700);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

.draw-overlay.active .overlay-particle {
    animation: particleFloat 2s ease-in-out infinite;
}

@keyframes particleFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0); }
    20%  { opacity: 0.8; transform: translateY(-20px) scale(1); }
    100% { opacity: 0; transform: translateY(-80px) scale(0.3); }
}
