/* ===== SCANBACK MAIN STYLES ===== */

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

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-user-select: none;
    user-select: none;
}

/* ===== LANDING PAGE ===== */
#landing {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 1rem;
}

#landing.hidden {
    display: none;
}

.landing-container {
    width: 100%;
    max-width: 380px;
}

.landing-card {
    background: #2C2C2C;
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.landing-brand {
    margin-bottom: 2rem;
}

.landing-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: rgba(253, 184, 19, 0.1);
    border-radius: 16px;
    margin: 0 auto 1rem;
}

.landing-icon svg {
    width: 48px;
    height: 48px;
}

.landing-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}

.landing-hero {
    margin-bottom: 2.5rem;
}

.landing-tagline {
    font-size: 1.75rem;
    font-weight: 700;
    color: #FDB813;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.landing-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #FDB813;
    color: #000000;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 200px;
    width: 100%;
    max-width: 260px;
}

.cta-button:hover {
    background: #FFD233;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(253, 184, 19, 0.3);
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.cta-button:hover .cta-arrow {
    transform: translateX(3px);
}

/* ===== APP CONTAINER ===== */
#app {
    display: none;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

#app.active {
    display: flex;
}

/* ===== HEADER / TOP BAR ===== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #FDB813 0%, #FFCC00 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #FDB813 0%, #FFCC00 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #000;
}

.logo-icon {
    font-size: 1.5rem;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    flex: 1;
    margin-left: 0.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.points-badge {
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: #000;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #000;
}

/* ===== BURGER MENU ===== */
.burger-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.burger-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: rgba(26, 26, 26, 0.98);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

.burger-menu.open {
    left: 0;
}

.burger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
}

.burger-overlay.show {
    display: block;
}

.burger-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.burger-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.burger-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.burger-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.burger-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.burger-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #FDB813;
}

.burger-nav-item.active {
    background: rgba(253, 184, 19, 0.1);
    border-left-color: #FDB813;
    color: #FDB813;
}

.burger-nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
}

.burger-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ===== MAIN CONTENT AREA ===== */
.screen-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 60px;
    margin-bottom: 70px;
    overflow: hidden;
}

.screen {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    display: flex;
}

.screen-content {
    width: 100%;
    padding: 1rem;
    padding-top: 80px; /* Mehr Platz für Header */
    padding-bottom: 100px;
}

.screen-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #FDB813;
    margin-bottom: 0.5rem;
}

.screen-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

/* ===== SECTION STYLING ===== */
.section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FDB813;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title-icon {
    font-size: 1.5rem;
}

.section-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ===== CARDS & CONTAINERS ===== */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    font-weight: 600;
    color: #FDB813;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.card-body {
    color: rgba(255, 255, 255, 0.9);
}

.card-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 0.95rem;
}

/* ===== BUTTONS ===== */
.btn {
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.875rem 1.5rem;
    min-height: 48px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: #FDB813;
    color: #000;
}

.btn-primary:hover:not(:disabled) {
    background: #FFD233;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(253, 184, 19, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: #FDB813;
    border: 2px solid #FDB813;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(253, 184, 19, 0.1);
}

.btn-secondary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: transparent;
    color: #F44336;
    border: 2px solid #F44336;
}

.btn-danger:hover:not(:disabled) {
    background: rgba(244, 67, 54, 0.1);
}

.btn-danger:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.btn-row .btn {
    flex: 1;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.button-row button {
    flex: 1;
}

/* ===== SCANNER SCREEN ===== */
.scanner-section {
    text-align: center;
}

.scanner-section .section-title {
    text-align: center;
    justify-content: center;
}

.scanner-hint {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

#reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.scanner-container {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 70px;
    background: #000;
    z-index: 200;
}

#scannerVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border: 3px solid #FDB813;
    border-radius: 20px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.scanner-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #FDB813;
    border-radius: 50%;
    color: #FDB813;
    font-size: 24px;
    cursor: pointer;
    z-index: 210;
}

/* ===== HISTORY / SCAN LIST ===== */
.scan-history {
    list-style: none;
}

.scan-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scan-item-name {
    font-weight: 600;
    color: #FDB813;
    margin-bottom: 5px;
}

.scan-item-details {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    gap: 1rem;
}

.scan-item-points {
    color: #4CAF50;
    font-weight: 600;
}

.scan-item-time {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: #222;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    height: 100%;
    gap: 4px;
    transition: color 0.3s;
}

.nav-btn.active {
    color: #FDB813;
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.nav-btn-label {
    font-size: 11px;
    font-weight: 500;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.3s ease;
    pointer-events: auto;
}

.toast.error {
    background: #f44336;
}

.toast.warning {
    background: #ff9800;
}

.toast.info {
    background: #2196F3;
}

.toast.show {
    display: block;
}

.toast:not(.show) {
    display: none;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== FORM ELEMENTS ===== */
input, textarea, select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    font-family: inherit;
    font-size: 15px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #FDB813;
    background: rgba(255, 255, 255, 0.08);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== RESPONSIVES LAYOUT ===== */
@media (min-width: 600px) {
    .screen-content {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

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

.text-muted {
    color: rgba(255, 255, 255, 0.6);
}

.text-success {
    color: #4CAF50;
}

.text-error {
    color: #f44336;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ===== SCROLLBAR STYLING ===== */
.screen::-webkit-scrollbar {
    width: 6px;
}

.screen::-webkit-scrollbar-track {
    background: transparent;
}

.screen::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.screen::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== POINTS ANIMATION & OVERLAYS ===== */
.points-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.points-bubble {
    background: linear-gradient(135deg, #FDB813 0%, #FFD233 100%);
    color: #000;
    padding: 1.5rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(253, 184, 19, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: bounceIn 0.5s ease-out;
    min-height: 60px;
    max-width: 85vw;
}

.points-message {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
}

.points-plus {
    font-size: 2rem;
    font-weight: 700;
}

.points-number {
    font-size: 3rem;
    font-weight: 800;
}

.points-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.points-animation.fade-out .points-bubble {
    animation: fadeOutUp 0.5s ease-in forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}
