/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #ffd700, #f59e0b, #d97706);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

body.light-mode .reading-progress {
    background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24);
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 998;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.back-to-top:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px) scale(0.95);
}

.back-to-top-icon {
    font-size: 1.5rem;
    line-height: 1;
    color: #ffd700;
    font-weight: bold;
}

.back-to-top-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

/* Light mode styles */
body.light-mode .back-to-top {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(217, 119, 6, 0.3);
}

body.light-mode .back-to-top:hover {
    background: rgba(217, 119, 6, 0.15);
    border-color: #d97706;
    box-shadow: 0 12px 40px rgba(217, 119, 6, 0.3);
}

body.light-mode .back-to-top-icon,
body.light-mode .back-to-top-label {
    color: #d97706;
}

/* Reading Time Indicator */
.reading-time {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #ffd700;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.reading-time-icon {
    font-size: 1.2rem;
    line-height: 1;
}

body.light-mode .reading-time {
    background: rgba(217, 119, 6, 0.1);
    border-left-color: #d97706;
    color: #4a5568;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 48px;
        height: 48px;
    }

    .back-to-top-icon {
        font-size: 1.3rem;
    }

    .back-to-top-label {
        font-size: 0.6rem;
    }

    .reading-time {
        margin: 15px 0;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Animation keyframes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
}

/* Subtle pulse animation on first appearance */
.back-to-top.visible:not(:hover) {
    animation: pulse 2s ease-in-out;
}
