/* OPERATION LASTFRAME - Styles */

:root {
    --bg: #1a1a2e;
    --surface: #16213e;
    --surface-light: #1f3460;
    --primary: #e94560;
    --primary-light: #ff6b81;
    --text: #eaeaea;
    --text-dim: #8a8a9a;
    --success: #4ade80;
    --warning: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 600;
}

header h1 .material-icons {
    font-size: 2rem;
    color: var(--primary);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge.vip {
    background: var(--primary);
    color: white;
}

.badge.guest {
    background: var(--surface-light);
    color: var(--text-dim);
}

.quota {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Dropzone */
.dropzone {
    background: var(--surface);
    border: 2px dashed var(--surface-light);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 32px;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary);
    background: var(--surface-light);
}

.dropzone .material-icons {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 16px;
}

.dropzone p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.dropzone p.small {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.dropzone input[type="file"] {
    display: none;
}

/* Queue */
.queue {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}

.queue.hidden {
    display: none;
}

.queue h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-dim);
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
    margin-bottom: 8px;
}

.queue-item .filename {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-item .status {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.queue-item .status.processing {
    color: var(--warning);
}

.queue-item .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--surface);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Results */
.results h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-dim);
}

.results .empty {
    text-align: center;
    color: var(--text-dim);
    padding: 40px;
}

#resultItems {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.result-item {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
}

.result-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}

.result-item img:hover {
    transform: scale(1.02);
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.result-actions .filename {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--surface-light);
    border: none;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
}

.btn-icon .material-icons {
    font-size: 20px;
}

/* Throttle countdown */
.throttle-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.throttle-modal {
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}

.throttle-modal h2 {
    margin-bottom: 16px;
}

.throttle-modal .countdown {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin: 24px 0;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: #000;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    z-index: 1001;
}

.toast.error {
    background: var(--primary);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }

    header h1 {
        font-size: 1.4rem;
    }

    .dropzone {
        padding: 40px 20px;
    }

    .dropzone .material-icons {
        font-size: 48px;
    }

    #resultItems {
        grid-template-columns: 1fr;
    }
}
