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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 50%, #1a1a1a 100%);
    color: white;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.header-line {
    width: 6rem;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    margin: 0 auto;
    border-radius: 2px;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

/* Counter Container */
.counter-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Counter Display */
.counter-display {
    text-align: center;
    margin-bottom: 2rem;
}

#counter-number {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    color: white;
    font-family: 'Inter', monospace;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.counter-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Control Buttons */
.control-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn-control:active {
    transform: scale(0.95);
}

#decrease-btn {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

#decrease-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

#decrease-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#reset-btn {
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.3);
}

#reset-btn:hover {
    background: rgba(107, 114, 128, 0.3);
}

/* TAP Button */
#tap-btn {
    width: 100%;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border: none;
    color: white;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    padding: 1.5rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

#tap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

#tap-btn:active {
    transform: translateY(0);
}

/* Auto-save Indicator */
.auto-save-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #10b981;
}

.save-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* About Section */
.about-section {
    width: 100%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
}

.about-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-section strong {
    color: white;
    font-weight: 600;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.feature-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-content {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.brand {
    color: white;
    font-weight: 600;
}

.copyright {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Dialog Styles */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.dialog-box {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.dialog-box h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.dialog-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.6;
}

.dialog-buttons {
    display: flex;
    gap: 1rem;
}

.btn-cancel, .btn-confirm {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: rgba(107, 114, 128, 0.2);
    color: white;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.btn-cancel:hover {
    background: rgba(107, 114, 128, 0.3);
}

.btn-confirm {
    background: rgba(239, 68, 68, 0.2);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-confirm:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .counter-container {
        padding: 1.5rem;
    }
    
    .about-section {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        gap: 0.75rem;
    }
    
    .btn-control {
        width: 3rem;
        height: 3rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }
    
    #counter-number {
        font-size: 2.5rem;
    }
    
    #tap-btn {
        font-size: 1.25rem;
        padding: 1.25rem;
    }
    
    .about-section h2 {
        font-size: 1.5rem;
    }
}