/**
 * Custom Styles for Mobile Telegram Web App
 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.scan-button {
    width: 100%;
    height: 38px;
    background: linear-gradient(309deg, #AC0C0C 0%, #460505 100%);
    color: white;
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scan-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.scanner-container {
    margin-top: 15px;
}

.prizes-container {
    min-height: 200px;
}

.btn-back {
    width: 100%;
    height: 38px;
    background: linear-gradient(309deg, #AC0C0C 0%, #460505 100%);
    color: white;
    border: none;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.toast-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast-notification {
    background: white;
    color: #212529;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    min-width: 250px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #dc3545;
}

.toast-success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #198754;
}

.toast-info {
    background: #eef;
    color: #33c;
    border-left: 4px solid #0d6efd;
}

.prize-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.prize-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-close-prize {
    width: 100%;
    height: 38px;
    background: linear-gradient(309deg, #AC0C0C 0%, #460505 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-close-prize:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
}

.btn-close-prize:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-page {
    min-height: 100vh;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-content {
    width: 100%;
    max-width: 400px;
}

.auth-button {
    width: 100%;
    background: linear-gradient(309deg, #AC0C0C 0%, #460505 100%);
    color: white;
    border: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 26px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    padding: 14px 20px;
}

.auth-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-error {
    background-color: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Error Message */
.alert {
    border-radius: 10px;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
}

.alert-danger {
    background-color: #fee;
    color: #c33;
}

/* Navbar */
.navbar {
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 18px;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

/* Container */
.container {
    padding: 15px;
}

/* Typography */
h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.lead {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .auth-card {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .container {
        padding: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
}

@media (prefers-color-scheme: dark) {
    /* .tg-theme-dark .auth-page {
        background-color: #50555a;
    }
    
    .tg-theme-dark .card {
        background-color: #50555a;
        color: #fff;
    }
    
    .tg-theme-dark body {
        background-color: #50555a;
        color: #fff;
    } */
}

/* Loading State */
.loader {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Text Muted */
.text-muted {
    color: #6c757d !important;
    font-size: 14px;
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 10px;
}

/* Form Controls */
.form-control {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    font-size: 16px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Utilities */
.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

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

.w-100 {
    width: 100% !important;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}
