/* ==================== Streak Badge ==================== */
.streak-badge {
    position: fixed;
    top: 2vh;
    right: 2vh;
    z-index: 1000;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.streak-fire-count {
    display: flex;
    align-items: center;
    gap: 0.4vh;
    background: rgba(255, 255, 255, 0.95);
    border: 0.2vh solid var(--streak-color, #9ca3af);
    border-radius: 1vh;
    padding: 0.8vh 1.6vh;
    box-shadow: 0 0.4vh 1.2vh var(--streak-glow, rgba(0, 0, 0, 0.08));
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1;
}

.streak-fire-count:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.6vh 1.6vh var(--streak-glow, rgba(0, 0, 0, 0.12));
}

.streak-fire {
    font-size: 1.8vh;
    line-height: 1;
}

.streak-number {
    font-size: 1.8vh;
    font-weight: 800;
    color: var(--streak-color, #6b7280);
    letter-spacing: -0.5px;
    line-height: 1;
}

@keyframes fireFlicker {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.08) rotate(-3deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.05) rotate(2deg); }
}

/* ==================== Streak Panel ==================== */
.streak-panel {
    position: absolute;
    top: calc(100% + 1vh);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 1.4vh;
    padding: 1.6vh;
    min-width: 26vh;
    box-shadow: 0 1vh 3vh rgba(0, 0, 0, 0.15), 0 0.2vh 0.6vh rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.8vh) scale(0.96);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 0.1vh solid rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.streak-panel-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.streak-panel-title {
    font-size: 1.5vh;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.2vh;
    padding-bottom: 0.8vh;
    border-bottom: 0.15vh solid #e5e7eb;
}

/* ==================== Streak Rows ==================== */
.streak-row {
    display: grid;
    grid-template-columns: 2.4vh 1fr auto auto;
    align-items: center;
    gap: 0.8vh;
    padding: 0.8vh 0.4vh;
    border-radius: 0.6vh;
    transition: background 0.15s;
}

.streak-row-active {
    background: rgba(74, 144, 226, 0.06);
}

.streak-row-link {
    cursor: pointer;
    transition: background 0.15s;
}

.streak-row-link:hover {
    background: rgba(74, 144, 226, 0.1);
}

.streak-row-global {
    margin-top: 0.6vh;
    padding-top: 1vh;
    border-top: 0.15vh solid #e5e7eb;
}

.streak-row-icon {
    font-size: 1.6vh;
    line-height: 1;
    text-align: center;
}

.streak-row-label {
    font-size: 1.4vh;
    font-weight: 600;
    color: #374151;
}

.streak-row-current {
    font-size: 1.8vh;
    font-weight: 800;
    text-align: right;
    min-width: 2.4vh;
}

.streak-row-best {
    font-size: 1.1vh;
    color: #9ca3af;
    font-weight: 500;
    text-align: right;
    min-width: 6vh;
}

/* ==================== Tier Label ==================== */
.streak-tier-label {
    font-size: 1.2vh;
    font-weight: 700;
    text-align: center;
    margin-top: 1vh;
    padding-top: 0.8vh;
    border-top: 0.15vh solid #e5e7eb;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==================== Logged-Out Prompt ==================== */
.streak-login-prompt {
    font-size: 1.3vh;
    color: #4b5563;
    text-align: center;
    padding: 1.5vh 1vh;
    line-height: 1.6;
}

.streak-login-prompt a {
    color: #4A90E2;
    font-weight: 700;
    text-decoration: none;
}

.streak-login-prompt a:hover {
    text-decoration: underline;
}

/* ==================== Mobile ==================== */
@media (max-width: 480px) {
    .streak-badge {
        top: 1.2vh;
        right: 1.2vh;
    }

    .streak-fire-count {
        padding: 0.8vh 1.6vh;
    }

    .streak-fire {
        font-size: 1.4vh;
    }

    .streak-number {
        font-size: 1.4vh;
    }
}

@media (max-width: 360px) {
    .streak-badge {
        top: 1vh;
        right: 1vh;
    }

    .streak-fire-count {
        padding: 0.7vh 1.4vh;
    }

    .streak-fire {
        font-size: 1.3vh;
    }

    .streak-number {
        font-size: 1.3vh;
    }
}
