/* Paperclip Clicker - Styles */
/* Clips & Paper Huisstijl */

:root {
    --brand-green: #1b5e3b;
    --brand-orange: #e85d04;
    --success: #4caf50;
    --danger: #f44336;
    --warning: #ffc107;
    --info: #2196f3;
    --bg-light: #f5f5f5;
    --text-dark: #333;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--brand-green) 0%, #0d3a23 100%);
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen.hidden {
    display: none;
}

/* Container */
.container {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: var(--brand-green);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Game Info */
.game-info {
    margin: 30px 0;
}

.game-info h2 {
    color: var(--brand-green);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.info-list li::before {
    content: "📎";
    position: absolute;
    left: 0;
}

/* Prizes */
.prizes {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.prize {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 150px;
    box-shadow: var(--shadow-sm);
}

.prize .medal {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.prize .amount {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-green);
    margin-bottom: 5px;
}

.prize .label {
    display: block;
    color: #666;
    font-size: 0.9rem;
}

.prize.gold { border: 3px solid #ffd700; }
.prize.silver { border: 3px solid #c0c0c0; }
.prize.bronze { border: 3px solid #cd7f32; }

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid var(--info);
    color: #0d47a1;
}

.alert-success {
    background: #e8f5e9;
    border-left: 4px solid var(--success);
    color: #2e7d32;
}

.alert-warning {
    background: #fff3e0;
    border-left: 4px solid var(--warning);
    color: #e65100;
}

.alert-danger {
    background: #ffebee;
    border-left: 4px solid var(--danger);
    color: #c62828;
}

/* Form */
.start-form {
    margin: 30px 0;
}

.start-form h3 {
    color: var(--brand-green);
    margin-bottom: 20px;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--brand-green);
}

.privacy-notice {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.privacy-notice small {
    color: #666;
    line-height: 1.5;
}

.newsletter-optin {
    margin: 15px 0;
}

.newsletter-optin label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.newsletter-optin input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-green) 0%, #0d3a23 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-large {
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
}

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

.btn-group .btn {
    flex: 1;
    min-width: 200px;
}

/* Leaderboard */
.leaderboard-preview,
.leaderboard-full {
    margin: 30px 0;
}

.leaderboard-preview h3,
.leaderboard-full h2 {
    color: var(--brand-green);
    margin-bottom: 20px;
    text-align: center;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.leaderboard-table th {
    background: var(--brand-green);
    color: white;
    font-weight: 600;
}

.leaderboard-table tr:hover {
    background: #f5f5f5;
}

.leaderboard-table .rank {
    width: 80px;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.leaderboard-table .rank-1 { color: #ffd700; }
.leaderboard-table .rank-2 { color: #c0c0c0; }
.leaderboard-table .rank-3 { color: #cd7f32; }

.week-info {
    text-align: center;
    color: #666;
    margin-top: 15px;
    font-size: 0.9rem;
}

.leaderboard-empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Game Screen */
#game-screen {
    background: linear-gradient(135deg, var(--brand-green) 0%, #0d3a23 100%);
    padding: 10px;
}

.game-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-header {
    background: white;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-around;
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
    gap: 15px;
}

.game-header .stat {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.game-header .label {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.game-header .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-green);
}

.game-header .timer {
    color: var(--brand-orange);
}

/* Game Canvas */
#game-canvas-container {
    position: relative;
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none;
}

/* Powerups */
.powerup {
    position: absolute;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #c44d03 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    font-size: 0.9rem;
}

.powerup:hover {
    transform: scale(1.1);
}

.powerup.hidden {
    display: none;
}

#powerup-freeze {
    top: 10px;
    left: 10px;
}

#powerup-size {
    top: 10px;
    right: 10px;
}

/* Event Banner */
.event-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px 50px;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    z-index: 20;
    animation: pulse 1s ease-in-out;
}

.event-banner.hidden {
    display: none;
}

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

/* Game Footer */
.game-footer {
    text-align: center;
}

.hint {
    background: rgba(255, 255, 255, 0.95);
    color: var(--brand-green);
    padding: 12px 20px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Results Screen */
.results-header h1 {
    color: var(--brand-green);
    text-align: center;
    margin-bottom: 30px;
}

.final-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-box {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 150px;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-green);
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.results-message {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 1.2rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--brand-orange);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .prizes {
        flex-direction: column;
    }
    
    .game-header {
        padding: 12px;
        gap: 10px;
    }
    
    .game-header .stat {
        min-width: 70px;
    }
    
    .game-header .label {
        font-size: 0.75rem;
    }
    
    .game-header .value {
        font-size: 1.3rem;
    }
    
    #game-screen {
        padding: 5px;
    }
    
    .game-wrapper {
        gap: 8px;
    }
    
    .hint {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    .final-stats {
        flex-direction: column;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    #game-canvas {
        max-width: 100%;
    }
    
    /* Powerups kleiner op mobiel */
    .powerup {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
}

/* Tablet en grotere schermen */
@media (min-width: 769px) {
    .game-wrapper {
        gap: 15px;
    }
    
    .game-header {
        padding: 20px;
    }
    
    .game-header .value {
        font-size: 1.8rem;
    }
    
    #game-screen {
        padding: 20px;
    }
}

/* Desktop - extra ruimte */
@media (min-width: 1024px) {
    .game-wrapper {
        max-width: 1200px;
        gap: 20px;
    }
    
    .game-header {
        padding: 25px 40px;
    }
    
    .game-header .stat {
        min-width: 120px;
    }
}

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