/* --- Design Tokens --- */
:root {
    --bg-color: #000000;
    --text-main: #FFFFFF;
    --text-dim: #888888;

    --surface: #000000;
    --surface-container: #111111;
    --surface-hover: #1A1A1A;

    --outline: #333333;
    --accent: #FFFFFF;

    --radius-lg: 24px;
    --radius-md: 12px;

    --font-main: 'Roboto', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

/* --- Fixed Background --- */
.ambient-glow {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08) 0%, rgba(0,0,0,0) 60%);
    z-index: -1;
    pointer-events: none;
}

.app-container {
    width: 100%;
    max-width: 650px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

/* --- Header --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 2rem 0;
}

.home-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
    transition: opacity 0.2s ease;
}

.home-link:hover { opacity: 0.7; }

.logo-section h1 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: -0.5px;
    margin: 0;
}

.logo-section .highlight {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    border: 1px solid var(--outline);
    padding: 6px 12px;
    border-radius: 50px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.live-dot {
    width: 6px; height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
}

/* --- Upload Section --- */
.upload-section { flex: 0 0 auto; margin-bottom: 2rem; }

.drop-zone {
    background-color: var(--surface-container);
    border: 1px dashed var(--outline);
    border-radius: var(--radius-lg);
    height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s var(--ease-spring);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.drag-active {
    background-color: var(--surface-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.illustration { position: relative; margin-bottom: 16px; }

.large-icon {
    font-size: 56px;
    color: var(--text-main);
    z-index: 2;
    position: relative;
}

.ripple-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 80px; height: 80px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--outline);
    border-radius: 50%;
    opacity: 0;
    z-index: 1;
}

.drop-zone:hover .ripple-ring { animation: ripple 1.5s infinite; }

@keyframes ripple {
    0% { width: 50px; height: 50px; opacity: 0.4; border-color: var(--accent); }
    100% { width: 130px; height: 130px; opacity: 0; }
}

.drop-zone h2 { font-size: 1.1rem; font-weight: 500; margin-bottom: 6px; }
.drop-zone p { color: var(--text-dim); font-size: 0.9rem; }

/* --- Transmission Log --- */
.log-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--outline);
    padding-bottom: 8px;
}

.log-header span.material-symbols-rounded { font-size: 16px; }

.log-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-card {
    background-color: var(--surface-container);
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideIn 0.4s var(--ease-spring) forwards;
    opacity: 0;
    transform: translateX(-20px);
    border: 1px solid transparent;
}

.log-card.success { border-color: #333; }
.log-card.error { border-color: #666; border-style: dashed; }

.file-icon-box {
    width: 42px; height: 42px;
    background-color: var(--surface-hover);
    color: var(--text-main);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--outline);
}

.file-details { flex: 1; }

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.file-status {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.progress-bar {
    height: 2px;
    background-color: var(--outline);
    margin-top: 8px;
    width: 100%;
    position: relative;
}

.progress-fill {
    position: absolute;
    left: 0; top: 0; height: 100%;
    background-color: var(--accent);
    width: 0%;
    transition: width 0.2s ease-out;
}

/* --- Footer --- */
footer {
    margin-top: auto;
    padding-top: 2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    padding-bottom: 0.5rem;
}

footer a {
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 0 4px;
}

footer a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* --- Animations & Mobile --- */
@keyframes slideIn {
    to { opacity: 1; transform: translateX(0); }
}

/* Mobile Optimization */
@media (max-width: 600px) {
    .logo-section h1 {
        font-size: 0.9rem; /* Smaller title on mobile */
    }

    .app-container {
        padding: 1rem; /* Slightly less padding on mobile */
    }
}