/* ========================================
   DOCIT - Editorial Design System
   Aesthetic: Bold, Editorial, Magazine-like
   Typography: Clash Display + Satoshi
   ======================================== */

:root {
    /* Color Palette - Warm Coral & Deep Navy */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: rgba(22, 27, 34, 0.8);

    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #484f58;

    --accent: #ff6b35;
    --accent-light: #ff8f66;
    --accent-glow: rgba(255, 107, 53, 0.4);

    --success: #3fb950;
    --error: #f85149;

    --border: rgba(240, 246, 252, 0.1);

    /* Typography */
    --font-display: 'Clash Display', sans-serif;
    --font-body: 'Satoshi', sans-serif;

    /* Spacing */
    --radius: 16px;
    --radius-lg: 24px;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* App Container */
.app {
    min-height: 100vh;
    position: relative;
}

/* Animated Background Mesh */
.bg-mesh {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 70% at 0% 0%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 80% 60% at 100% 100%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
    z-index: 0;
    animation: mesh-shift 20s ease-in-out infinite;
}

@keyframes mesh-shift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Subtle Grain Texture */
.bg-grain {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

/* Floating Geometric Shapes */
.shape {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--accent) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    opacity: 0.1;
    animation: float-1 15s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(225deg, #3b82f6 0%, transparent 70%);
    bottom: 10%;
    right: 5%;
    opacity: 0.08;
    animation: float-2 12s ease-in-out infinite;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent);
    top: 40%;
    left: 45%;
    opacity: 0.03;
    animation: float-3 18s ease-in-out infinite;
}

@keyframes float-1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(30px, 20px) rotate(10deg);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, -30px) scale(1.1);
    }
}

@keyframes float-3 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(40px, -20px);
    }
}

/* Main Layout - Asymmetric Split */
.layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    min-height: 100vh;
    gap: 0;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
}

/* Brand Section (Left) */
.brand-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    border-right: 1px solid var(--border);
}

@media (max-width: 900px) {
    .brand-section {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 32px 24px;
    }
}

.brand-content {
    max-width: 400px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    animation: slide-up 0.6s ease-out backwards;
}

.logo-img {
    height: 64px;
    /* Larger size per user request */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.logo-loader {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 24px;
    display: block;
    animation: spin-pause 2.5s infinite ease-in-out;
}

@keyframes spin-pause {
    0% {
        transform: rotate(0deg);
    }

    30% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Obsolete text/symbol styles removed or kept if fallback needed, 
   but user wants image. Keeping text structure for logic if needed, 
   but primarily styling the image. */
.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    /* Optional: Hide text if logo contains text info, 
       but keeping it for now as side-text if needed. 
       User said "replace the lightning logo", implied keeping text?
       "valto @[src/public/docit_logo.png] ... kai na vgaleis to logo tis astrapis"
       I will assume replacing the symbol with image. */
}

/* Headline */
.headline {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    animation: slide-up 0.6s ease-out backwards;
}

.headline-line {
    display: block;
}

.headline-line.accent {
    color: var(--accent);
    position: relative;
}

.headline-line.accent::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Tagline */
.tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    animation: slide-up 0.6s ease-out backwards;
}

/* Feature Badges */
.feature-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    animation: slide-up 0.6s ease-out backwards;
}

.badge {
    display: inline-flex;
    padding: 6px 14px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent-light);
}

/* Brand Footer */
.brand-footer {
    color: var(--text-muted);
    font-size: 0.8125rem;
    animation: slide-up 0.6s ease-out backwards;
}

/* Action Section (Right) */
.action-section {
    display: flex;
    flex-direction: column;
    padding: 48px;
    justify-content: center;
    align-items: center;
}

@media (max-width: 900px) {
    .action-section {
        padding: 32px 24px 48px;
    }
}

/* Auth Bar */
.auth-bar {
    width: 100%;
    max-width: 420px;
    margin-bottom: 24px;
    animation: slide-up 0.6s ease-out backwards;
}

.auth-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-user svg {
    color: var(--accent);
}

.auth-logout {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-logout:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

/* Action Card */
.action-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    backdrop-filter: blur(20px);
    animation: slide-up 0.6s ease-out backwards;
}

/* States */
.state {
    text-align: center;
}

.state.hidden {
    display: none;
}

.state h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.state p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Icon Circles */
.icon-circle,
.state-visual {
    margin-bottom: 24px;
}

.icon-circle {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    color: var(--accent);
}

/* Google Button */
.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    margin-top: 24px;
    background: #fff;
    border: none;
    border-radius: var(--radius);
    color: #1f2937;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* Upload Zone */
.upload-zone {
    padding: 48px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s ease;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(255, 107, 53, 0.05);
}

.upload-zone.drag-over {
    transform: scale(1.02);
}

.upload-visual {
    color: var(--accent);
    margin-bottom: 16px;
    opacity: 0.8;
}

.upload-zone:hover .upload-visual {
    opacity: 1;
}

/* Loader */
.loader-visual {
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto 24px;
}

.loader-spinner {
    position: absolute;
    inset: 0;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.progress-label {
    display: block;
    margin-top: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Success */
.success-visual {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    background: rgba(63, 185, 80, 0.1);
    border-radius: 50%;
    color: var(--success);
    animation: pop 0.4s ease;
}

@keyframes pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Error */
.error-visual {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    background: rgba(248, 81, 73, 0.1);
    border-radius: 50%;
    color: var(--error);
}

#errorMessage {
    color: var(--error);
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Slide Up Animation */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .action-card {
        padding: 32px 24px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   BATCH PROCESSING STYLES
   ======================================== */

.batch-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
}

.batch-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.batch-results-list {
    max-height: 240px;
    overflow-y: auto;
    margin: 16px 0;
    text-align: left;
}

.batch-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.batch-result-row.batch-success {
    background: rgba(63, 185, 80, 0.08);
    border: 1px solid rgba(63, 185, 80, 0.15);
}

.batch-result-row.batch-error {
    background: rgba(248, 81, 73, 0.08);
    border: 1px solid rgba(248, 81, 73, 0.15);
}

.batch-result-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    color: var(--text-primary);
}

.batch-result-error {
    color: var(--error);
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.batch-download-btn {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--success);
    border-radius: 6px;
    color: var(--success);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.batch-download-btn:hover {
    background: rgba(63, 185, 80, 0.1);
}

.batch-results-list::-webkit-scrollbar {
    width: 4px;
}

.batch-results-list::-webkit-scrollbar-track {
    background: transparent;
}

.batch-results-list::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
}

/* ========================================
   TRUST FOOTER (E-E-A-T)
   ======================================== */

.trust-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.95);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
}

.trust-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
}

.trust-badge svg {
    flex-shrink: 0;
}

.trust-divider {
    color: var(--border);
}

.trust-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.trust-link:hover {
    color: var(--accent);
}

@media (max-width: 600px) {
    .trust-content {
        flex-wrap: wrap;
        gap: 8px;
    }

    .trust-divider {
        display: none;
    }
}