/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: #004697;
    min-height: 100vh;
}

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

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

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main content */
.main {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card h2 {
    color: #2196F3;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.card ul {
    list-style: none;
}

.card li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.card li:last-child {
    border-bottom: none;
}

/* Counter */
.counter {
    text-align: center;
}

#count {
    font-size: 3rem;
    font-weight: bold;
    color: #2196F3;
    display: block;
    margin-bottom: 20px;
}

.counter-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.counter-buttons button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #2196F3;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.counter-buttons button:hover {
    background: #1976D2;
}

/* Buttons */
.btn {
    background: #2196F3;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.btn:hover {
    background: #1976D2;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Connection status */
#connection-status {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

#connection-status.online {
    background: #4CAF50;
    color: white;
}

#connection-status.offline {
    background: #f44336;
    color: white;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .main {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    #count {
        font-size: 2.5rem;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Install prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
    max-width: 90%;
}

.install-prompt.show {
    display: block;
}

.install-prompt button {
    margin: 0 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.install-prompt .install-btn {
    background: #2196F3;
    color: white;
}

.install-prompt .dismiss-btn {
    background: #f0f0f0;
    color: #333;
} 