/* 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%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

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

/* Main content */
main {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 20px;
}

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

.status-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #2196F3;
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-2px);
}

.status-card h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2196F3;
}

.status {
    font-size: 1rem;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e9ecef;
}

.status.enabled {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status.disabled {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
    min-width: 140px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: #1976D2;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #2196F3;
    color: #2196F3;
}

.btn-outline:hover:not(:disabled) {
    background: #2196F3;
    color: white;
    transform: translateY(-1px);
}

/* Sections */
.test-section,
.info-section,
.api-section {
    margin: 40px 0;
    padding: 25px;
    border-radius: 15px;
}

.test-section {
    background: #e3f2fd;
    border-left: 5px solid #2196F3;
}

.info-section {
    background: #f3e5f5;
    border-left: 5px solid #9c27b0;
}

.api-section {
    background: #e8f5e8;
    border-left: 5px solid #4caf50;
}

.test-section h2,
.info-section h2,
.api-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.info-section ol {
    padding-left: 20px;
}

.info-section li {
    margin: 10px 0;
    font-size: 1.1rem;
}

/* Code blocks */
code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

pre code {
    background: none;
    padding: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
        margin-top: 10px;
    }
    
    .status-section {
        grid-template-columns: 1fr;
    }
    
    .status-card,
    .test-section,
    .info-section,
    .api-section {
        padding: 20px;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    main {
        padding: 15px;
    }
}

/* PWA specific styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 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); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Callback examples section */
.callback-examples {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.callback-examples h3 {
    margin-bottom: 15px;
    color: #495057;
}

.callback-examples .btn {
    margin: 5px 0;
}

/* Callback content styling */
.callback-content {
    animation: slideIn 0.3s ease-out;
}

.notification-feedback {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    0% { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Enhanced code blocks for callback examples */
.api-section pre {
    position: relative;
}

.api-section h3 {
    color: #2196F3;
    margin: 20px 0 10px 0;
    font-size: 1.2rem;
}

/* Responsive adjustments for callback examples */
@media (max-width: 768px) {
    .callback-examples .btn {
        width: 100%;
        margin: 5px 0;
    }
}
