* { box-sizing: border-box; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

body {
    background-image: url('background.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    padding: 15px;
    margin: 0;
    min-height: 100vh;
}

#app-container {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    align-self: center;
}

.hidden { display: none !important; }

header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 2rem; border-bottom: 1px solid #eee; padding-bottom: 1.2rem; }
.header-top { display: flex; justify-content: space-between; align-items: center; }
.user-tag, #user-display { font-size: 0.85rem; color: #888; }
header h2 { margin: 0; font-size: 1.8rem; color: #111; font-weight: 800; }

#btn-logout { background: transparent; color: #dc3545; border: 1px solid #ffccd1; padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: 0.75rem; font-weight: 600; }

.counter-card { background: #fff; border: 1px solid #f0f0f0; padding: 20px; border-radius: 20px; margin-bottom: 25px; display: flex; flex-direction: column; gap: 10px; }
.counter-header { display: flex; justify-content: space-between; align-items: center; }
.counter-name { font-size: 1.1rem; font-weight: 600; border: none; color: #000; background: transparent; flex-grow: 1; }
.btn-delete { background: none; border: none; color: #ddd; cursor: pointer; font-size: 1.2rem; }

.count-display { container-type: inline-size; width: 100%; display: flex; justify-content: center; min-height: 140px; }
.count-value {
    width: 100%;
    font-size: clamp(1.5rem, 20cqw, 7rem); 
    font-weight: 800;
    text-align: center;
    border: none;
    background: transparent;
    color: #111;
    outline: none;
    letter-spacing: -2px;
}

.counter-controls { display: flex; gap: 12px; width: 100%; }
.counter-controls button { flex: 1; height: 120px; font-size: 3.5rem; font-weight: 200; border-radius: 18px; border: none; cursor: pointer; color: white; }
.btn-minus { background-color: #adb5bd; }
.btn-plus { background-color: #007bff; }

.captcha-container { display: flex; justify-content: center; margin-bottom: 15px; }

#btn-add-counter { width: 100%; padding: 20px; background: #28a745; color: white; border: none; border-radius: 16px; font-weight: 600; cursor: pointer; }
#auth-form input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 10px; }
.buttons { display: flex; gap: 10px; }
.buttons button { flex: 1; padding: 12px; border: none; border-radius: 10px; font-weight: 600; cursor: pointer; }
#btn-login { background: #007bff; color: white; }
#btn-register { background: #eee; color: #333; }