/* API Documentation Specific Styles */

/* API Hero */
.api-hero {
    min-height: 60vh;
    padding-top: 100px;
}

.api-hero .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
}

.api-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

/* Version Badge */
.version-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Quick Start Grid */
.quick-start-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.quick-start-card {
    background: var(--dark-card);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.quick-start-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(145, 70, 255, 0.3);
}

.quick-start-card i {
    background: var(--gradient-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.3rem;
    color: white;
}

.quick-start-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.quick-start-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* API Methods */
.api-method {
    background: var(--dark-card);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 40px 0;
    overflow: hidden;
}

.method-header {
    background: rgba(145, 70, 255, 0.1);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.method-header h3 {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    margin: 0;
}

.method-type {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-method > p {
    padding: 0 30px 20px;
    margin: 20px 0 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Method Parameters */
.method-params {
    padding: 0 30px 20px;
}

.method-params h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.params-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-surface);
    border-radius: 8px;
    overflow: hidden;
}

.params-table th {
    background: rgba(145, 70, 255, 0.2);
    color: var(--text-primary);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.params-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.params-table code {
    background: rgba(145, 70, 255, 0.2);
    color: var(--primary-color);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Method Examples */
.method-example {
    padding: 0 30px 30px;
}

.method-example h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* HTTP Method Badges */
.http-method {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 10px;
}

.http-method.get {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.http-method.post {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.http-method.put {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.http-method.delete {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Response Examples */
.response-example {
    background: var(--dark-surface);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.response-example h5 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.response-example .response-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.response-status.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.response-status.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Code Playground */
.code-playground {
    background: var(--dark-card);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.playground-header {
    background: rgba(0, 245, 255, 0.1);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playground-header h4 {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1.1rem;
}

.try-button {
    background: var(--secondary-color);
    color: var(--dark-bg);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.try-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.playground-content {
    padding: 20px;
}

/* API Navigation Enhancements */
.sidebar-nav .nav-section h4 {
    position: relative;
}

.sidebar-nav .nav-section h4::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Interactive Elements */
.interactive-demo {
    background: var(--dark-card);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    margin: 30px 0;
}

.interactive-demo h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.interactive-demo h4 i {
    background: var(--gradient-primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.demo-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.demo-input {
    background: var(--dark-surface);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 200px;
}

.demo-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.1);
}

.demo-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.demo-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.demo-output {
    background: var(--dark-surface);
    border-radius: 6px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    min-height: 100px;
    white-space: pre-wrap;
}

/* Tooltip System */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-bg);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(145, 70, 255, 0.3);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .api-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .quick-start-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .method-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .method-header h3 {
        font-size: 1.1rem;
    }
    
    .params-table {
        font-size: 0.8rem;
    }
    
    .params-table th,
    .params-table td {
        padding: 8px;
    }
    
    .demo-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .demo-input {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .api-method > p,
    .method-params,
    .method-example {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .method-header {
        padding: 15px 20px;
    }
    
    .interactive-demo {
        padding: 20px;
    }
}