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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    /* comfortable general padding; logo will be in normal flow */
    padding: 40px 40px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* Logo placed in normal flow above the title */
.app-logo {
    position: relative;
    display: block;
    margin: 8px auto 16px;
}
.app-logo:empty { display: none; }
.app-logo img {
    width: clamp(80px, 28vw, 160px);
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}

header h1 {
    color: #333;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.counter-section {
    margin: 40px 0;
}

.counter-section h2 {
    color: #444;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Styling for the main app title */
.counter-section h1.app-title {
    color: #444;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.counter-display {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

#dayCounter {
    font-size: 4rem;
    font-weight: bold;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Large bubble for previous record to visually match the main counter */
.record-display {
    background: linear-gradient(135deg, #ffb75e 0%, #ed8f03 100%);
    color: white;
    padding: 26px;
    border-radius: 15px;
    margin: 18px 0;
    box-shadow: 0 10px 30px rgba(237, 143, 3, 0.2);
    display: inline-block;
    min-width: 220px;
    text-align: center;
}

#previousRecordLarge {
    font-size: 3.2rem;
    font-weight: 700;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.18);
}

.days-label {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.last-update {
    color: #666;
    font-size: 0.9rem;
    margin-top: 15px;
}

.admin-section {
    margin-top: 40px;
}

.admin-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.admin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.admin-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.admin-panel.hidden {
    display: none;
}

.admin-panel h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.update-button, .reset-button, .cancel-button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 100px;
}

.update-button {
    background: #28a745;
    color: white;
}

.update-button:hover {
    background: #218838;
    transform: translateY(-1px);
}

.reset-button {
    background: #ffc107;
    color: #333;
}

.reset-button:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.cancel-button {
    background: #6c757d;
    color: white;
}

.cancel-button:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

footer p {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    #dayCounter {
        font-size: 3rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .update-button, .reset-button, .cancel-button {
        flex: none;
        width: 100%;
    }

    .app-logo img {
        width: clamp(72px, 40vw, 140px);
    }
} 