/* shared/styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.config-section {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.config-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.config-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.config-group input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-status.authenticated {
    background: #d4edda;
    color: #155724;
}

.auth-status.unauthenticated {
    background: #f8d7da;
    color: #721c24;
}

.main-content {
    padding: 40px;
}

/* Navigation Grid for Homepage */
.navigation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.nav-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.nav-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.nav-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.nav-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Content Layout for API Pages */
.content-layout {
    display: flex;
    min-height: 600px;
}

.sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    padding: 0;
}

.nav-item {
    display: block;
    padding: 15px 20px;
    color: #495057;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background: #007bff;
    color: white;
}

.content-area {
    flex: 1;
    padding: 30px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 30px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #6c757d;
    margin: 0 8px;
}

/* Endpoint Styling */
.endpoint-group {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.endpoint-header {
    background: #6c757d;
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.endpoint {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.endpoint:last-child {
    border-bottom: none;
}

.endpoint-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.method-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.method-get { background: #28a745; color: white; }
.method-post { background: #007bff; color: white; }
.method-put { background: #ffc107; color: black; }
.method-delete { background: #dc3545; color: white; }

.endpoint-path {
    font-family: 'Monaco', 'Menlo', monospace;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
    font-family: 'Monaco', 'Menlo', monospace;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-clear {
    background: #6c757d;
}

.btn-success {
    background: #28a745;
}

.btn-google {
    background: #fff;
    color: #333;
    border: 2px solid #e1e5e9;
}

.btn-google:hover {
    background: #f8f9fa;
}

.btn-facebook {
    background: #4267B2;
    color: white;
}

.btn-facebook:hover {
    background: #365899;
}

.btn-logout {
    background: #dc3545;
}

.auth-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

/* Response Display */
.response-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.response-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-200 { background: #d4edda; color: #155724; }
.status-201 { background: #d4edda; color: #155724; }
.status-400 { background: #f8d7da; color: #721c24; }
.status-401 { background: #f8d7da; color: #721c24; }
.status-404 { background: #f8d7da; color: #721c24; }
.status-500 { background: #f8d7da; color: #721c24; }

.response-body {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-authenticated {
    background: #28a745;
}

.status-unauthenticated {
    background: #dc3545;
}

.user-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.user-info h4 {
    color: #0056b3;
    margin-bottom: 10px;
}

.user-info p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #495057;
}

.error, .success {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.success {
    background: #efe;
    color: #393;
    border: 1px solid #cfc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .content-area {
        order: 1;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .navigation-grid {
        grid-template-columns: 1fr;
    }
    
    .config-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .auth-status {
        margin-left: 0;
        margin-top: 10px;
    }
}