/* ============================================
   WHEEL GAME - COMPLETE STYLESHEET
   Production-Ready CSS for cPanel Deployment
   ============================================ */

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #e0c3fc 0%, #f8e4f8 50%, #dae2f8 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1f2937;
    line-height: 1.6;
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* === HEADER === */
header {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

header .subtitle {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* === CONTENT WRAPPER === */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

/* === CARDS === */
.card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === AUTH CARD === */
.auth-card {
    max-width: 500px;
    margin: 0 auto;
}

.auth-description {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close:hover {
    color: #1f2937;
}

/* === FORMS === */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.reg-code-input {
    background: #faf5ff !important;
    border-color: #d8b4fe !important;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #6366f1;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4f46e5;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-spin {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    font-size: 1.125rem;
}

.btn-spin:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-link {
    background: transparent;
    color: #6b7280;
    padding: 0.5rem;
    font-size: 0.9rem;
    width: 100%;
}

.btn-link:hover {
    color: #1f2937;
    background: #f3f4f6;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* === MESSAGES === */
.message-box {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
    border: 2px solid;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.message-error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.hidden {
    display: none !important;
}

/* === INFO & WARNING BOXES === */
.info-box, .warning-box {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

.info-box {
    background: #dbeafe;
    border: 2px solid #3b82f6;
}

.info-box h3 {
    font-size: 1rem;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.info-box ul {
    list-style: none;
    color: #1e3a8a;
    font-size: 0.9rem;
}

.info-box ul li {
    margin-bottom: 0.25rem;
}

.warning-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    color: #92400e;
    font-size: 0.9rem;
}

.warning-box strong {
    color: #78350f;
}

/* === WHEEL CONTAINER === */
.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

#wheelCanvas, #adminWheelCanvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === WINNER DISPLAY === */
.winner-display {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.winner-content .trophy {
    font-size: 3rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.winner-content h3 {
    font-size: 1.5rem;
    color: white;
    margin: 1rem 0 0.5rem;
}

.winner-name {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.congrats {
    color: white;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* === STATS BOX === */
.stats-box {
    background: #f3f4f6;
    border-radius: 0.5rem;
    padding: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.stat-label {
    color: #6b7280;
}

.stat-value {
    font-weight: 700;
    color: #1f2937;
}

/* === ADMIN SECTIONS === */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-info p {
    color: #6b7280;
    font-size: 0.95rem;
}

.admin-info strong {
    color: #1f2937;
    font-weight: 700;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* === ENTRIES SECTION === */
.entries-section {
    margin-top: 2rem;
}

.entries-section h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entries-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.entries-list::-webkit-scrollbar {
    width: 8px;
}

.entries-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.entries-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.entries-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.entry-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.entry-item:hover {
    border-color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.entry-number {
    font-weight: 700;
    color: #8b5cf6;
    margin-right: 0.75rem;
}

.entry-name {
    flex: 1;
    color: #1f2937;
    font-weight: 500;
}

.entry-actions {
    display: flex;
    gap: 0.5rem;
}

.no-entries {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    font-style: italic;
}

/* === LINKS === */
.admin-link, .user-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.admin-link a, .user-link a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.admin-link a:hover, .user-link a:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* === FOOTER === */
footer {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.security-features {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.security-features h3 {
    text-align: center;
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature {
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.75rem;
    transition: transform 0.2s;
}

.feature:nth-child(1) {
    background: #dbeafe;
}

.feature:nth-child(2) {
    background: #f3e8ff;
}

.feature:nth-child(3) {
    background: #d1fae5;
}

.feature:hover {
    transform: translateY(-2px);
}

.feature strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.feature p {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 0;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .winner-name {
        font-size: 1.5rem;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1.5rem 0.5rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .form-group input {
        padding: 0.625rem 0.875rem;
    }
    
    #wheelCanvas, #adminWheelCanvas {
        width: 100%;
        height: auto;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* === PRINT STYLES === */
@media print {
    body {
        background: white;
    }
    
    .btn, .admin-link, .user-link {
        display: none;
    }
}