/* MagentiQ Color Scheme */
:root {
    --primary-bg: #ffffff;
    --primary-text: #000000;
    --secondary-text: #32373c;
    --accent-cyan: #0693e3;
    --accent-purple: #9b51e0;
    --accent-pink: #f78da7;
    --accent-red: #cf2e2e;
    --gradient-primary: linear-gradient(135deg, #0693e3 0%, #9b51e0 100%);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Scanner Section */
.scanner-section {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.video-container {
    position: relative;
    max-width: 100%;
    width: 100%;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

#video {
    width: 100%;
    height: auto;
    display: block;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-frame {
    width: 95%;
    max-width: 700px;
    aspect-ratio: 1;
    border: 4px solid var(--accent-cyan);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        border-color: var(--accent-cyan);
    }
    50% {
        border-color: var(--accent-purple);
    }
}

/* Buttons */
.btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    box-shadow: var(--shadow);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #1e2327;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.status-message {
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--secondary-text);
    font-weight: 500;
}

/* Results Section */
.results-section {
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.results-section h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--primary-text);
    text-align: center;
}

.data-card {
    background: linear-gradient(135deg, rgba(6, 147, 227, 0.05) 0%, rgba(155, 81, 224, 0.05) 100%);
    border: 2px solid var(--accent-cyan);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.data-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-purple);
    display: flex;
    align-items: center;
}

.data-card h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    margin-right: 10px;
    border-radius: 2px;
}

.data-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(6, 147, 227, 0.2);
}

.data-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.loading {
    color: var(--accent-cyan);
    font-style: italic;
    text-align: center;
}

.error {
    color: var(--accent-red);
    font-weight: 600;
    padding: 15px;
    background: rgba(207, 46, 46, 0.1);
    border-radius: 6px;
    border-left: 4px solid var(--accent-red);
}

.success {
    color: #059669;
    font-weight: 600;
    padding: 15px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 6px;
    border-left: 4px solid #059669;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .scanner-section,
    .results-section {
        padding: 15px;
    }

    .scanner-section {
        padding: 10px;
    }

    .scanner-frame {
        width: 95%;
        max-width: 500px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .data-card {
        padding: 15px;
    }
}

/* Scrollbar Styling */
.data-content::-webkit-scrollbar {
    width: 8px;
}

.data-content::-webkit-scrollbar-track {
    background: rgba(6, 147, 227, 0.1);
    border-radius: 4px;
}

.data-content::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

.data-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}
