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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #2C1810 0%, #704538 50%, #8B6F47 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.spin-wheel-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 8px #F5E6D3, inset 0 0 0 10px #704538;
    border: 5px solid #F5E6D3;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #F5E6D3 0%, #E8D4B8 100%);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #704538;
    font-size: 16px;
    letter-spacing: 1px;
    border: 3px solid #704538;
}

.wheel-pointer {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid #D4AF37;
    z-index: 5;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
}

.spinning {
    animation: spin 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(1800deg); }
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #D4AF37;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

.toast.error {
    background: #FEE;
    color: #C33;
    border-left: 4px solid #C33;
}

.toast.success {
    background: #EFE;
    color: #3C3;
    border-left: 4px solid #3C3;
}

@keyframes slideInRight {
    from { transform: translateX(400px); }
    to { transform: translateX(0); }
}

.btn-primary {
    background: linear-gradient(135deg, #704538 0%, #8B6F47 100%);
    color: #F5E6D3;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 2px solid #D4AF37;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(112, 69, 56, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(112, 69, 56, 0.6);
    background: linear-gradient(135deg, #8B6F47 0%, #704538 100%);
    border-color: #FFD700;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #F5E6D3;
    color: #704538;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    border: 2px solid #704538;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #704538;
    color: #F5E6D3;
    border-color: #D4AF37;
}

.loader {
    border: 4px solid #F5E6D3;
    border-top: 4px solid #704538;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin-loader 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.prize-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: #D4EDDA;
    color: #155724;
}

.status-redeemed {
    background: #D1ECF1;
    color: #0C5460;
}

.status-expired {
    background: #F8D7DA;
    color: #721C24;
}

@media (max-width: 768px) {
    .spin-wheel-container {
        width: 280px;
        height: 280px;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }

}

@media (max-width: 480px) {
    .spin-wheel-container {
        width: 250px;
        height: 250px;
    }

    .wheel-center {
        width: 50px;
        height: 50px;
        font-size: 0.875rem;
    }
}

.qr-scanner-container {
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
}

#qr-reader {
    border: 2px solid #667eea;
    border-radius: 10px;
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

tr:hover {
    background: #f5f5f5;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #704538;
}

.stat-label {
    color: #666;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #704538;
    box-shadow: 0 0 0 3px rgba(112, 69, 56, 0.1);
}

.input-error {
    border-color: #ff4444 !important;
}

.error-message {
    color: #ff4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.logo-container {
    max-width: 200px;
    margin: 0 auto 2rem;
    text-align: center;
}

.logo-container img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
