/* =============================================================================
   Insta Downloader - Custom Theme Overrides for Bulma
   Light & Colorful Instagram-Inspired Theme
   ============================================================================= */

/* ===== Custom Properties ===== */
:root {
    --instagram-purple: #833AB4;
    --instagram-pink: #C13584;
    --instagram-orange: #F56040;
    --instagram-yellow: #FCAF45;
    --gradient-start: #833AB4;
    --gradient-mid: #C13584;
    --gradient-end: #E1306C;
    --success-green: #00d4aa;
}

/* ===== Navbar — Sleek Dark with Green Accent ===== */
.navbar.is-gradient {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 50%, #16213e 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid #2d2d5e;
}


.navbar.is-gradient .navbar-brand .navbar-item {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.navbar.is-gradient .navbar-brand .navbar-item:hover {
    background: rgba(0, 212, 170, 0.12);
    color: #ffffff;
}

.navbar.is-gradient .navbar-end .navbar-item {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    position: relative;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.navbar.is-gradient .navbar-end .navbar-item::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: #00d4aa;
    border-radius: 2px;
    transition: transform 0.25s ease;
}

.navbar.is-gradient .navbar-end .navbar-item:hover {
    background: rgba(0, 212, 170, 0.08);
    color: #ffffff;
}

.navbar.is-gradient .navbar-end .navbar-item:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar.is-gradient .navbar-burger span {
    background-color: #ffffff;
    height: 2px;
    width: 20px;
    border-radius: 2px;
}

.navbar.is-gradient .navbar-burger:hover {
    background: rgba(0, 212, 170, 0.12);
    border-radius: 4px;
}

.navbar.is-gradient .navbar-burger.is-active span {
    background-color: #00d4aa;
}

/* Mobile menu dropdown */
@media screen and (max-width: 1023px) {
    .navbar.is-gradient {
        border-bottom: none;
    }

    .navbar.is-gradient .navbar-menu {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        border-top: 1px solid rgba(0, 212, 170, 0.15);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .navbar.is-gradient .navbar-menu .navbar-item {
        color: rgba(255, 255, 255, 0.85);
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1rem !important;
    }

    .navbar.is-gradient .navbar-menu .navbar-item::after {
        display: none;
    }

    .navbar.is-gradient .navbar-menu .navbar-item:hover {
        background: rgba(0, 212, 170, 0.08);
        color: #00d4aa;
    }
}



/* ===== Hero Gradient Override ===== */
.hero.is-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    position: relative;
    overflow: hidden;
}

.hero.is-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ===== Bulma Variable Overrides (applied to root) ===== */
.box {
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.box:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
}

/* ===== Input Style Override ===== */
.input:focus {
    box-shadow: 0 0 0 3px rgba(131, 58, 180, 0.15);
}

/* ===== Button Overrides ===== */
.button.is-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    border: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button.is-primary:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(131, 58, 180, 0.4);
}

.button.is-primary:active {
    transform: translateY(0);
}

/* ===== Step Boxes ===== */
.step-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
}

.step-number {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid)) !important;
    border: none !important;
    font-weight: 700;
}

/* ===== Feature Boxes ===== */
.feature-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid transparent;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    border-top-color: var(--instagram-purple);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ===== Download Card Override ===== */
.download-card {
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid #f0f0f0;
}

/* ===== Progress Bar ===== */
.progress.is-primary::-webkit-progress-value {
    background: linear-gradient(135deg, var(--gradient-start), var(--success-green));
}

.progress.is-primary::-moz-progress-bar {
    background: linear-gradient(135deg, var(--gradient-start), var(--success-green));
}

.progress.is-primary::-ms-fill {
    background: linear-gradient(135deg, var(--gradient-start), var(--success-green));
}

/* ===== Spinner ===== */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--instagram-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Status & Result Areas ===== */
.result-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.status-message {
    font-size: 0.9rem;
}

/* ===== Download Items Grid ===== */
#downloadList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    align-items: start;
}

.media-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.media-item .preview-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    background: #000;
    overflow: hidden;
}

.media-item .preview-thumb video,
.media-item .preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-item .media-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-item .button {
    width: 100%;
    justify-content: center;
}

.button.is-success {
    background: linear-gradient(135deg, var(--success-green), #00b894);
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button.is-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

/* ===== FAQ ===== */
.faq-item {
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    border: none !important;
    background: #fafafa !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.25rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #f0f0f0 !important;
}

.faq-arrow {
    transition: transform 0.3s;
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.open .faq-question {
    border-radius: 12px 12px 0 0 !important;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    font-size: 0.9rem;
    color: #555;
    display: none;
    border-top: 1px solid #f0f0f0;
}

.faq-item.open .faq-answer {
    display: block;
}

/* ===== Footer ===== */
.footer {
    background: #fafafa !important;
    padding: 2rem 1.5rem !important;
}

/* ===== Responsive Tweaks ===== */
@media screen and (max-width: 768px) {
    .hero-body {
        padding: 3rem 1.5rem !important;
    }

    .field.has-addons {
        flex-wrap: wrap;
    }

    .field.has-addons .control.is-expanded {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .field.has-addons .control:not(.is-expanded) {
        width: 100%;
    }

    .field.has-addons .button {
        width: 100%;
    }

    .faq-question {
        font-size: 0.85rem !important;
        padding: 1rem !important;
    }
}
