* {
    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;
    padding: 20px;
}

/* Login Page Styles */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    margin-top: 10vh;
}

/* Dashboard Styles */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

.content {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

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

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

.result {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    display: none;
}

.result.show {
    display: block;
}

.result h3 {
    color: #333;
    margin-bottom: 15px;
}

pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.5;
}

.error {
    background: #fee;
    border-left: 4px solid #f44;
    padding: 15px;
    border-radius: 5px;
    color: #c33;
    margin-bottom: 20px;
    display: none;
}

.error.show {
    display: block;
}

.success {
    background: #efe;
    border-left: 4px solid #4c4;
    padding: 15px;
    border-radius: 5px;
    color: #363;
    margin-bottom: 15px;
}

.loading {
    text-align: center;
    padding: 20px;
    display: none;
}

.loading.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
}

.info-box h4 {
    color: #1976d2;
    margin-bottom: 8px;
}

.info-box p {
    color: #555;
    line-height: 1.6;
}

.api-keys-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.api-keys-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.api-key-item {
    background: white;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.api-key-item code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #495057;
}

.docs-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.docs-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.docs-link a:hover {
    text-decoration: underline;
}

/* Admin Statistics Styles */
.admin-section {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}

.admin-section h3 {
    color: #856404;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
    }
}

.stats-box {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-box h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.stats-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    font-size: 0.9em;
    border-bottom: 2px solid #dee2e6;
}

.stats-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9em;
}

.stats-table tr:hover {
    background: #f8f9fa;
}

.stats-table code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #495057;
}

.stats-table strong {
    color: #007bff;
    font-weight: 700;
}

