/* 
 * Neobrutalism UI - OneWord AI Subtitle Generator
 * High contrast, bold borders, sharp shadows, vibrant colors
 */

/* ========== FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
    /* Colors */
    --color-bg: #fafafa;
    --color-primary: #6366f1;
    --color-secondary: #f97316;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-accent: #fbbf24;

    /* Grid */
    --grid-size: 20px;
    --grid-color: rgba(0, 0, 0, 0.05);

    /* Borders */
    --border-width: 3px;
    --border-color: var(--color-black);

    /* Shadows */
    --shadow-offset: 6px;
    --shadow-color: var(--color-black);

    /* Typography */
    --font-family: 'Space Grotesk', -apple-system, system-ui, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-black);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ========== GRID BACKGROUND ========== */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    pointer-events: none;
    z-index: 0;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px;
    position: relative;
    z-index: 1;
}

/* ========== HEADER ========== */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-black);
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 8px;
    text-shadow:
        3px 3px 0 var(--color-primary),
        6px 6px 0 var(--color-secondary);
}

.subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-black);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========== CARD ========== */
.card {
    background: var(--color-white);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--shadow-color);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translate(-2px, -2px);
    box-shadow:
        calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0 var(--shadow-color);
}

.card-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: var(--border-width) solid var(--color-black);
}

.card-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========== DROPZONE ========== */
.dropzone {
    border: var(--border-width) dashed var(--color-black);
    background: var(--color-bg);
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.dropzone:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.dropzone:hover .dropzone-content {
    color: var(--color-white);
}

.dropzone.dragover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: scale(0.98);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    stroke-width: 3;
}

.dropzone-text {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.dropzone-subtext {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.file-limit {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 500;
}

/* ========== FILE INFO ========== */
.file-info {
    background: var(--color-success);
    border: var(--border-width) solid var(--color-black);
    padding: 20px;
    margin-top: 20px;
    color: var(--color-white);
    font-weight: 600;
}

.file-info p {
    margin: 5px 0;
}

/* ========== FORM ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.select-input {
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-family);
    border: var(--border-width) solid var(--color-black);
    background: var(--color-white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-input:hover {
    background: var(--color-accent);
}

.select-input:focus {
    outline: none;
    background: var(--color-primary);
    color: var(--color-white);
}

/* ========== BUTTONS ========== */
.btn-primary,
.btn-download,
.btn-secondary,
.btn-instagram {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-family);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: var(--border-width) solid var(--color-black);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 4px 4px 0 var(--shadow-color);
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--color-secondary);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--shadow-color);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-download {
    background: var(--color-success);
    color: var(--color-white);
    margin-bottom: 15px;
}

.btn-download:hover {
    background: var(--color-primary);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--shadow-color);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-black);
}

.btn-secondary:hover {
    background: var(--color-accent);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--shadow-color);
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--color-white);
    margin-top: 15px;
}

.btn-instagram:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--shadow-color);
}

/* ========== PROGRESS ========== */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 40px;
    border: var(--border-width) solid var(--color-black);
    background: var(--color-bg);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--color-success);
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.2) 10px,
            rgba(255, 255, 255, 0.2) 20px);
}

.progress-text {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-top: 10px;
}

.status-text {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px;
    background: var(--color-accent);
    border: var(--border-width) solid var(--color-black);
}

/* ========== POPUP ========== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.popup-card {
    background: var(--color-white);
    border: var(--border-width) solid var(--color-black);
    box-shadow: 10px 10px 0 var(--shadow-color);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
}

.popup-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.popup-card p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-danger);
    color: var(--color-white);
    border: var(--border-width) solid var(--color-black);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: var(--color-black);
    transform: rotate(90deg);
}

/* ========== UTILITY ========== */
.hidden {
    display: none !important;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
        text-shadow:
            2px 2px 0 var(--color-primary),
            4px 4px 0 var(--color-secondary);
    }

    .card {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer strong {
    color: var(--color-primary);
    font-weight: 700;
}