:root {
    --bg-dark: #0f1115;
    --bg-panel: #161920;
    --bg-card: #1e222b;
    --primary: #00ff9d;
    --accent: #ff0055;
    --text-main: #ffffff;
    --text-dim: #8b9bb4;
    --border: #2a303c;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.logo-icon {
    font-size: 24px;
    color: var(--primary);
}

.logo h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.subtitle {
    margin: 0 0 40px 0;
    color: var(--text-dim);
    font-size: 14px;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 30px;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 157, 0.05);
}

.upload-zone p {
    margin: 0 0 5px 0;
    font-weight: 500;
}

.upload-zone span {
    font-size: 12px;
    color: var(--text-dim);
}

/* Content Area */
.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

h2 {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag {
    background: var(--primary);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

/* Baseline Card */
.baseline-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    min-height: 150px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.barcode-display {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.barcode-canvas {
    width: 100%;
    height: 80px;
    image-rendering: pixelated;
    background: #000;
    border-radius: 4px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 15px;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-2px);
    border-color: #3e4451;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.file-info {
    overflow: hidden;
}

.filename {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.filesize {
    font-size: 12px;
    color: var(--text-dim);
}

.baseline-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
}

.baseline-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.baseline-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.card-preview {
    background: #000;
    border-radius: 6px;
    height: 100px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

.preview-barcode {
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.card-stats {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.score {
    font-weight: bold;
}

.score.match {
    color: var(--primary);
}

.score.distinct {
    color: var(--accent);
}

.diff-list {
    margin-top: 10px;
    background: #111;
    border-radius: 4px;
    padding: 5px;
    border: 1px solid #333;
}

.diff-item {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    padding: 2px 0;
    border-bottom: 1px solid #222;
    color: #aaa;
    font-family: monospace;
}

.diff-item:last-child {
    border-bottom: none;
}

.video-player-container {
    margin: 10px 0;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.card-video {
    width: 100%;
    height: 150px;
    display: block;
    background: #000;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        overflow: auto;
        /* Allow full page scrolling */
    }

    .app-container {
        flex-direction: column;
        height: auto;
        /* Remove fixed height constraint */
    }

    /* Sidebar becomes a top header */
    .sidebar {
        width: auto;
        /* Full width (minus padding) */
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
        flex-shrink: 0;
        /* Preventing shrinking */
    }

    .logo {
        justify-content: center;
        margin-bottom: 5px;
    }

    .subtitle {
        text-align: center;
        margin-bottom: 20px;
    }

    .upload-zone {
        padding: 20px;
        margin-bottom: 15px;
    }

    .stats-panel {
        display: flex;
        justify-content: center;
    }

    /* Content Area adjustments */
    .content {
        padding: 20px;
        overflow-y: visible;
        /* Let the body handle scrolling */
    }

    /* Adjust Grid for smaller screens */
    .video-grid {
        grid-template-columns: 1fr;
        /* Full width cards on mobile */
        gap: 15px;
    }

    h2 {
        font-size: 16px;
    }
}

/* Attribution Footer */
/* Attribution Footer - Desktop Only */
.desktop-footer {
    display: flex;
    justify-content: center;
    padding: 30px 0 10px 0;
    margin-top: auto;
    width: 100%;
}

/* Attribution Footer - Copyright Style */
.copyright-text {
    font-size: 11px;
    color: #4a5160;
    margin: 0;
    letter-spacing: 0.2px;
}

.copyright-text a {
    color: #4a5160;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.copyright-text a:hover {
    color: var(--text-dim);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .desktop-footer {
        display: none !important;
    }
}
