/* Arquivos grátis / Drives — Família Unlocker */
:root {
    --ag-bg: #020403;
    --ag-green: #39ff88;
    --ag-green-dim: #6ab985;
    --ag-text: #d9ffe7;
    --ag-muted: #5a8f6e;
    --ag-line: rgba(57, 255, 136, 0.16);
    --ag-line-strong: rgba(57, 255, 136, 0.32);
    --ag-card: rgba(4, 12, 8, 0.88);
    --ag-radius: 16px;
    --ag-font: "Segoe UI", system-ui, sans-serif;
    --ag-mono: Consolas, "Cascadia Mono", "JetBrains Mono", monospace;
}

.ag-page {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ag-green);
    font-family: var(--ag-font);
    background:
        radial-gradient(ellipse 90% 55% at 50% -15%, rgba(57, 255, 136, 0.11), transparent 50%),
        radial-gradient(ellipse 40% 30% at 100% 100%, rgba(20, 184, 166, 0.06), transparent 50%),
        var(--ag-bg);
}

.ag-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.28;
    background:
        linear-gradient(rgba(57, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 136, 0.02) 1px, transparent 1px);
    background-size: 100% 3px, 3px 100%;
}

.ag-page::after {
    content: "";
    position: fixed;
    inset: -50% 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(57, 255, 136, 0.04), transparent);
    animation: agScan 10s linear infinite;
}

@keyframes agScan {
    from { transform: translateY(-35%); }
    to { transform: translateY(35%); }
}

#agMatrix {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.2;
    pointer-events: none;
}

/* Loader */
.ag-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ag-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ag-loader__box {
    width: min(400px, 90vw);
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--ag-line-strong);
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 0 40px rgba(57, 255, 136, 0.12);
}

.ag-loader__title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ag-text);
    margin-bottom: 12px;
}

.ag-loader__line {
    min-height: 48px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--ag-line);
    background: #000;
    font: 600 12px/1.6 var(--ag-mono);
    color: var(--ag-green);
}

.ag-loader__bar {
    height: 6px;
    margin-top: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #031109;
}

.ag-loader__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--ag-green);
    animation: agLoadBar 1.2s ease forwards;
}

@keyframes agLoadBar {
    to { width: 100%; }
}

/* Topo fixo */
.ag-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ag-line);
    background: rgba(2, 4, 3, 0.92);
    backdrop-filter: blur(10px);
}

.ag-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--ag-line-strong);
    background: rgba(0, 0, 0, 0.6);
    color: var(--ag-green);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    transition: 0.2s ease;
}

.ag-back:hover {
    background: rgba(57, 255, 136, 0.1);
    border-color: rgba(57, 255, 136, 0.45);
    color: #fff;
}

.ag-sound {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--ag-line);
    background: rgba(0, 0, 0, 0.6);
    color: var(--ag-green);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.ag-sound.is-on {
    background: var(--ag-green);
    color: #001508;
    border-color: transparent;
}

.ag-wrap {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 16px 48px;
}

/* Hero */
.ag-hero {
    text-align: center;
    padding: 28px 20px;
    margin-bottom: 20px;
    border-radius: 20px;
    border: 1px solid var(--ag-line);
    background: var(--ag-card);
    box-shadow: 0 0 32px rgba(57, 255, 136, 0.06);
}

.ag-hero .logo-stage--sm {
    margin-bottom: 14px;
}

.ag-hero h1 {
    margin: 0;
    font-size: clamp(1.5rem, 4.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.02em;
    text-shadow: 0 0 24px rgba(57, 255, 136, 0.2);
}

.ag-hero h1 .ag-cursor::after {
    content: "_";
    animation: agBlink 0.85s step-end infinite;
    color: var(--ag-green);
}

@keyframes agBlink {
    50% { opacity: 0; }
}

.ag-hero__sub {
    margin: 12px auto 0;
    max-width: 560px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ag-green-dim);
}

.ag-hero__sub strong {
    color: var(--ag-text);
}

/* Stats */
.ag-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.ag-stat {
    padding: 14px;
    border-radius: var(--ag-radius);
    border: 1px solid var(--ag-line);
    background: var(--ag-card);
    text-align: center;
}

.ag-stat span {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--ag-muted);
    text-transform: uppercase;
}

.ag-stat strong {
    display: block;
    margin-top: 6px;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ag-text);
    line-height: 1;
}

/* Terminal */
.ag-terminal {
    margin-bottom: 18px;
    border-radius: var(--ag-radius);
    border: 1px solid var(--ag-line);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.ag-terminal__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ag-line);
    background: rgba(57, 255, 136, 0.04);
}

.ag-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ag-dot--r { background: #ff5f57; }
.ag-dot--y { background: #febc2e; }
.ag-dot--g { background: var(--ag-green); }

.ag-terminal__title {
    margin-left: 6px;
    font: 700 11px/1 var(--ag-mono);
    letter-spacing: 0.08em;
    color: var(--ag-green-dim);
    text-transform: uppercase;
}

.ag-terminal__body {
    padding: 14px 16px;
    min-height: 56px;
    font: 600 13px/1.65 var(--ag-mono);
    color: var(--ag-green);
}

/* Controles sticky */
.ag-controls {
    position: sticky;
    top: 52px;
    z-index: 30;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: var(--ag-radius);
    border: 1px solid var(--ag-line);
    background: rgba(2, 8, 5, 0.94);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.ag-search {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 42px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid var(--ag-line);
    background: rgba(0, 0, 0, 0.65);
    color: var(--ag-green);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%236ab985' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 14px center;
}

.ag-search::placeholder {
    color: var(--ag-muted);
}

.ag-search:focus {
    border-color: rgba(57, 255, 136, 0.45);
    box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.1);
}

.ag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ag-filter {
    flex: 1 1 auto;
    min-width: fit-content;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--ag-line);
    background: rgba(0, 12, 6, 0.8);
    color: var(--ag-green-dim);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: 0.18s ease;
}

.ag-filter:hover {
    border-color: rgba(57, 255, 136, 0.35);
    color: var(--ag-text);
}

.ag-filter.is-active {
    background: var(--ag-green);
    color: #001508;
    border-color: transparent;
    box-shadow: 0 0 16px rgba(57, 255, 136, 0.2);
}

/* Tabs */
.ag-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.ag-tab {
    height: 52px;
    border-radius: 12px;
    border: 1px solid var(--ag-line);
    background: var(--ag-card);
    color: var(--ag-green-dim);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: 0.18s ease;
}

.ag-tab:hover {
    border-color: rgba(57, 255, 136, 0.35);
    color: var(--ag-text);
}

.ag-tab.is-active {
    background: linear-gradient(135deg, var(--ag-green), #14b8a6);
    color: #001508;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(57, 255, 136, 0.18);
}

.ag-panel {
    display: none;
}

.ag-panel.is-active {
    display: block;
}

/* Section */
.ag-section {
    border-radius: 20px;
    border: 1px solid var(--ag-line);
    background: var(--ag-card);
    overflow: hidden;
    box-shadow: 0 0 28px rgba(57, 255, 136, 0.04);
}

.ag-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-bottom: 1px solid var(--ag-line);
    background: rgba(57, 255, 136, 0.03);
}

.ag-section__title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ag-text);
}

.ag-section__meta {
    font-size: 11px;
    color: var(--ag-muted);
    font-weight: 600;
}

.ag-badge {
    min-width: 44px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--ag-line-strong);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--ag-text);
}

/* Cards */
.ag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 16px;
}

.ag-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--ag-line);
    background:
        linear-gradient(160deg, rgba(57, 255, 136, 0.04), transparent 55%),
        rgba(0, 0, 0, 0.55);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    border-left-width: 3px;
}

.ag-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(57, 255, 136, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.ag-card:hover {
    transform: translateY(-4px);
    border-color: rgba(57, 255, 136, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(57, 255, 136, 0.08);
}

.ag-card:hover::before {
    opacity: 1;
}

.ag-card:focus-visible {
    outline: 2px solid var(--ag-green);
    outline-offset: 2px;
}

.ag-card--samsung { border-left-color: #3b82f6; }
.ag-card--motorola { border-left-color: #ef4444; }
.ag-card--lg { border-left-color: #a855f7; }
.ag-card--qualcomm { border-left-color: #f59e0b; }
.ag-card--mediatek { border-left-color: #f97316; }
.ag-card--spreadtrum { border-left-color: #06b6d4; }
.ag-card--usb { border-left-color: #22d3ee; }
.ag-card--platform { border-left-color: #84cc16; }
.ag-card--default { border-left-color: var(--ag-green); }

.ag-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.ag-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 52px);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--ag-line);
    background: rgba(0, 0, 0, 0.45);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--ag-text);
}

.ag-tag__icon {
    font-size: 12px;
    line-height: 1;
}

.ag-new {
    flex-shrink: 0;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--ag-green);
    color: #001508;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.ag-card__title {
    margin-top: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    word-break: break-word;
}

.ag-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--ag-muted);
    letter-spacing: 0.04em;
}

.ag-card__meta .sep {
    opacity: 0.4;
}

.ag-dl {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--ag-line-strong);
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--ag-text);
    background: rgba(0, 0, 0, 0.35);
    transition: 0.2s ease;
}

.ag-card:hover .ag-dl {
    background: var(--ag-green);
    color: #001508;
    border-color: transparent;
}

/* Empty / no results */
.ag-empty,
.ag-noresult {
    margin: 16px;
    padding: 28px 20px;
    border-radius: 14px;
    border: 1px dashed var(--ag-line-strong);
    text-align: center;
    color: var(--ag-green-dim);
    line-height: 1.6;
    font-size: 14px;
}

.ag-noresult {
    display: none;
}

.ag-noresult.is-show {
    display: block;
}

.ag-empty code {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    font: 600 12px/1.4 var(--ag-mono);
    color: var(--ag-green);
}

/* Footer hint */
.ag-footer {
    margin-top: 24px;
    padding: 16px 18px;
    border-radius: var(--ag-radius);
    border: 1px solid var(--ag-line);
    background: rgba(57, 255, 136, 0.03);
    font-size: 12px;
    line-height: 1.6;
    color: var(--ag-muted);
}

.ag-footer strong {
    color: var(--ag-text);
}

@media (max-width: 720px) {
    .ag-wrap {
        padding: 64px 12px 36px;
    }

    .ag-stats {
        grid-template-columns: 1fr;
    }

    .ag-tabs {
        grid-template-columns: 1fr;
    }

    .ag-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .ag-controls {
        top: 48px;
    }

    .ag-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ag-page::after,
    #agMatrix {
        display: none !important;
    }
}
