/* Documentation Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fafbfc;
}

/* Navigation */
.doc-nav {
    background: white;
    border-bottom: 1px solid #e1e5e9;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #667eea;
}

.nav-logo i {
    font-size: 24px;
    color: #667eea;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
    background: #f7fafc;
}

.nav-link.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-link.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Main Container */
.doc-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.doc-sidebar {
    background: white;
    border-right: 1px solid #e1e5e9;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-content {
    padding: 32px 24px;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section li {
    margin-bottom: 4px;
}

.sidebar-link {
    display: block;
    padding: 8px 12px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: #667eea;
    background: #f7fafc;
}

.sidebar-link.active {
    color: #667eea;
    background: #edf2f7;
    font-weight: 500;
}

/* Main Content */
.doc-main {
    padding: 32px 48px;
    max-width: none;
}

.doc-content {
    max-width: 800px;
}

.doc-section {
    margin-bottom: 64px;
}

.doc-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.2;
}

.doc-subtitle {
    font-size: 1.25rem;
    color: #4a5568;
    margin-bottom: 48px;
    line-height: 1.5;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e1e5e9;
}

/* Introduction Cards */
.intro-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.intro-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.intro-card .card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.intro-card .card-icon i {
    font-size: 20px;
    color: white;
}

.intro-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.intro-card p {
    color: #4a5568;
    font-size: 0.875rem;
}

/* API Overview */
.api-overview {
    background: white;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    margin-bottom: 48px;
}

.api-overview h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.api-overview p {
    color: #4a5568;
    margin-bottom: 24px;
}

.api-info {
    display: grid;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f7fafc;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    min-width: 100px;
    color: #2d3748;
}

.info-item code {
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: #667eea;
}

/* Code Examples */
.code-example {
    background: #1e1e1e;
    border-radius: 12px;
    margin: 24px 0;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.code-header {
    background: #2d3748;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #4a5568;
}

.code-title {
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
}

.copy-btn {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #4a5568;
    color: white;
}

.code-example pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Endpoint */
.endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    padding: 16px 20px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.method {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.method.get {
    background: #c6f6d5;
    color: #22543d;
}

.method.post {
    background: #bee3f8;
    color: #2a4365;
}

.method.put {
    background: #fbb6ce;
    color: #702459;
}

.method.delete {
    background: #fed7d7;
    color: #742a2a;
}

.url {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: #2d3748;
    font-weight: 500;
}

/* Tables */
.params-table, .error-table {
    margin: 24px 0;
    overflow-x: auto;
}

.params-table table, .error-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.params-table th, .error-table th {
    background: #f7fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #e1e5e9;
}

.params-table td, .error-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f7fafc;
    vertical-align: top;
}

.params-table tr:last-child td, .error-table tr:last-child td {
    border-bottom: none;
}

.params-table code, .error-table code {
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #667eea;
}

/* Steps */
.steps {
    margin: 32px 0;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.step-content p {
    color: #4a5568;
}

/* Status List */
.status-list {
    margin: 24px 0;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f7fafc;
}

.status-item:last-child {
    border-bottom: none;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 80px;
    text-align: center;
}

.status-badge.pending {
    background: #fef5e7;
    color: #744210;
}

.status-badge.processing {
    background: #e6fffa;
    color: #234e52;
}

.status-badge.completed {
    background: #f0fff4;
    color: #22543d;
}

.status-badge.failed {
    background: #fed7d7;
    color: #742a2a;
}

.status-badge.cancelled {
    background: #edf2f7;
    color: #4a5568;
}

/* Warning Box */
.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: #fef5e7;
    border: 1px solid #f6e05e;
    border-radius: 8px;
    margin: 24px 0;
}

.warning-box i {
    color: #d69e2e;
    margin-top: 2px;
}

.warning-box div {
    color: #744210;
}

.warning-box strong {
    color: #744210;
}

/* Support Cards */
.support-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.support-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.support-card .card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.support-card .card-icon i {
    font-size: 20px;
    color: white;
}

.support-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.support-card p {
    color: #4a5568;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.support-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.support-link:hover {
    text-decoration: underline;
}

/* Footer */
.doc-footer {
    background: #1a1a1a;
    color: white;
    padding: 24px 0;
    margin-top: 64px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content p {
    margin: 0;
    color: #a0aec0;
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .doc-container {
        grid-template-columns: 1fr;
    }
    
    .doc-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e1e5e9;
    }
    
    .sidebar-content {
        padding: 24px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 24px;
    }
    
    .sidebar-section {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-logo span {
        display: none;
    }
    
    .doc-main {
        padding: 24px 16px;
    }
    
    .doc-title {
        font-size: 2rem;
    }
    
    .intro-cards {
        grid-template-columns: 1fr;
    }
    
    .support-cards {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .endpoint {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Security Features Styling */
.security-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.security-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.security-icon {
    margin-right: 15px;
    color: #28a745;
    font-size: 24px;
    flex-shrink: 0;
}

.security-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.security-content p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.security-tips {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.tip-item:last-child {
    margin-bottom: 0;
}

.tip-item i {
    margin-right: 12px;
    color: #856404;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.tip-item strong {
    color: #856404;
    margin-right: 5px;
}

@media (max-width: 480px) {
    .params-table, .error-table {
        font-size: 0.8rem;
    }
    
    .params-table th, .error-table th,
    .params-table td, .error-table td {
        padding: 8px 12px;
    }
    
    .security-features {
        grid-template-columns: 1fr;
    }
    
    .security-item {
        padding: 15px;
    }
}
