:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

@media (min-width: 480px) {
    .app-container {
        min-height: 80vh;
        border-radius: 20px;
        border: 1px solid var(--border);
    }
}

.header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: all 0.4s ease;
}

.card.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

.title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
}

/* Scanner */
.scanner-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: 2px solid var(--border);
}

#reader {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Custom Upload Button */
.custom-file-upload {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.custom-file-upload:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-muted);
}

.custom-file-upload i {
    margin-right: 8px;
}

input[type="file"] {
    display: none;
}

.status-msg {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* Payment Section */
.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-icon.check {
    color: var(--success);
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.order-details {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.875rem;
}

.detail-row span {
    color: var(--text-muted);
}

.detail-row strong {
    font-family: monospace;
    font-size: 1rem;
}

.detail-row.total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
}

.text-blue {
    color: #60a5fa !important;
}

.error-msg {
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 16px;
    text-align: center;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

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

.btn-secondary:hover:not(:disabled) {
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

.text-center {
    text-align: center;
}

.mt-3 { margin-top: 12px; }
.mt-5 { margin-top: 32px; }
