:root {
    --bg-dark: #0f172a;
    --primary: #6366f1;
    --primary-glow: #818cf8;
    --secondary: #ec4899;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Background Animation */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -50px;
    left: -50px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(30px, 50px);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 500px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(to right, #a5b4fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Scanner Section */
.scanner-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scan-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.scan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.stop-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}

#reader-container {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    position: relative;
    border: 2px solid var(--primary-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#reader {
    width: 100%;
}

.hidden {
    display: none !important;
}

.status-msg {
    color: var(--text-muted);
    font-size: 0.85rem;
    min-height: 20px;
}

/* Form Styles */
.glass-form {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.submit-button {
    flex: 2;
    background: var(--text-main);
    color: var(--bg-dark);
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.submit-button:hover {
    opacity: 0.9;
}

.clear-button {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.clear-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}