/* ========================================
   Clips & Paper Raadspel - Styling
   Huisstijl: Teal/Blauw + Goud accent
   ======================================== */

/* CSS Variables - Clips & Paper Huisstijl */
:root {
    --primary: #1a5f7a;          /* Donker teal/blauw */
    --primary-light: #57c5b6;    /* Licht teal */
    --primary-dark: #002b3d;     /* Extra donker */
    --accent: #f0a500;           /* Goud/oranje accent */
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light-gray: #f8f9fa;
    --dark-gray: #333;
    --white: #ffffff;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 40px;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 250px;
    height: auto;
}

/* Header */
h1 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.2em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-icon {
    font-size: 2em;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.9);
}

/* Prize Highlight */
.prize-highlight {
    background: linear-gradient(135deg, var(--accent) 0%, #e09400 100%);
    color: white;
    text-align: center;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(240, 165, 0, 0.4);
}

.prize-highlight span {
    font-size: 1.3em;
}

/* Number Picker Container */
.number-picker-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid rgba(26, 95, 122, 0.1);
}

.picker-title {
    text-align: center;
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.5em;
}

/* Selected Number Display */
.selected-number-display {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.selected-number-box {
    background: white;
    padding: 20px 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    text-align: center;
    min-width: 200px;
    border: 3px solid var(--primary);
}

.number-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.selected-number {
    font-size: 4em;
    font-weight: bold;
    color: #ccc;
    font-family: 'Courier New', monospace;
}

.selected-number.number-selected {
    color: var(--primary);
    animation: pulse 0.5s ease;
}

.selected-number.invalid-number {
    color: var(--danger);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* Number Picker */
.number-picker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.digit-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.digit-group label {
    text-align: center;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 1.1em;
}

.digit-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.digit-btn {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 10px;
    font-size: 1.8em;
    font-weight: bold;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.digit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-color: var(--primary);
    background: rgba(26, 95, 122, 0.1);
}

.digit-btn:active {
    transform: translateY(0);
}

.digit-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(26, 95, 122, 0.4);
}

.digit-separator {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary);
    margin: 0 20px;
}

/* Form Section */
.form-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
}

/* Screen Management */
.screen {
    display: block;
}

.screen.hidden {
    display: none;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--success);
    color: white;
}

.alert-error {
    background: var(--danger);
    color: white;
}

.alert-warning {
    background: var(--warning);
    color: #333;
}

.alert-info {
    background: var(--info);
    color: white;
}

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

/* Info Boxes */
.info-box {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid var(--primary);
}

.info-box h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.info-box ul {
    margin-left: 20px;
    line-height: 1.8;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.warning-box strong {
    color: #856404;
}

/* Email Info Box */
.email-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 0.95em;
}

.email-info-box strong {
    color: var(--primary);
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
}

input[type="text"],
input[type="email"],
input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

/* Checkbox & Radio */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 95, 122, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 95, 122, 0.5);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #e09400 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 165, 0, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 165, 0, 0.5);
}

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

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.2em;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Status Display */
.status-display {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.status-display h2 {
    margin-bottom: 20px;
    font-size: 2em;
}

.status-display .big-number {
    font-size: 5em;
    font-weight: bold;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: block;
}

.participants-info {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.participants-info p {
    font-size: 1.2em;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Terms Section */
.terms-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.terms-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.terms-content {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 10px;
    font-size: 0.9em;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.terms-content h3 {
    color: var(--primary);
    margin: 20px 0 10px 0;
    font-size: 1.1em;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content ul, 
.terms-content ol {
    margin: 10px 0 10px 25px;
}

.terms-content li {
    margin: 5px 0;
}

/* Footer */
.page-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.page-footer a {
    color: var(--primary);
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* Stats Tables */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stats-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.stats-table th,
.stats-table td {
    padding: 15px;
    text-align: left;
}

.stats-table tbody tr:nth-child(even) {
    background: var(--light-gray);
}

.stats-table tbody tr:hover {
    background: rgba(26, 95, 122, 0.1);
}

.rank-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
}

.rank-1 {
    background: var(--accent);
    color: #333;
}

.rank-2 {
    background: silver;
    color: #333;
}

.rank-3 {
    background: #cd7f32;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .logo-container img {
        max-width: 180px;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-item {
        justify-content: center;
    }
    
    .number-picker {
        flex-direction: column;
        gap: 20px;
    }
    
    .digit-separator {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .digit-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
    
    .selected-number {
        font-size: 3em;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .terms-content {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.4em;
    }
    
    .logo-container img {
        max-width: 150px;
    }
    
    .number-picker-container {
        padding: 20px;
    }
    
    .digit-buttons {
        grid-template-columns: repeat(5, 1fr);
        gap: 5px;
    }
    
    .digit-btn {
        width: 45px;
        height: 45px;
        font-size: 1em;
    }
    
    .selected-number {
        font-size: 2.5em;
    }
    
    .status-display .big-number {
        font-size: 3em;
    }
    
    .prize-highlight {
        font-size: 1em;
        padding: 12px 15px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

/* ============================================
   INVITE FRIENDS SECTION
   ============================================ */
.invite-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

.invite-section h3 {
    font-size: 1.3em;
    font-weight: 600;
}

.invite-section .btn-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.invite-section button {
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

/* Mobile responsive */
@media (max-width: 600px) {
    .invite-section {
        padding: 20px !important;
    }
    
    .invite-section h3 {
        font-size: 1.1em;
    }
    
    .invite-section p {
        font-size: 0.95em !important;
    }
    
    .invite-section .btn-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .invite-section button {
        width: 100%;
    }
}

