/* Enhanced API Documentation Preview Styles for HanuPayout */

.api-preview-enhanced {
    padding: 80px 0;
    background-color: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* Header Styles */
.api-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(76, 175, 80, 0.1));
    color: #2196F3;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 15px;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.api-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.api-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* API Showcase Container */
.api-showcase {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* API Features Panel */
.api-features-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2196F3, #4CAF50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* API Code Explorer */
.api-code-explorer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.code-window {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.code-header {
    background: #282a36;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.close {
    background-color: #ff5f56;
}

.minimize {
    background-color: #ffbd2e;
}

.maximize {
    background-color: #27c93f;
}

.window-title {
    color: #f8f8f2;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.code-tabs {
    display: flex;
    gap: 10px;
}

.code-tab {
    background: none;
    border: none;
    color: #6272a4;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-tab.active {
    background: rgba(98, 114, 164, 0.2);
    color: #f8f8f2;
}

.code-body {
    padding: 20px;
    position: relative;
}

.code-block {
    display: none;
    margin: 0;
    color: #f8f8f2;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.code-block.active {
    display: block;
}

/* Code syntax highlighting */
.code-comment {
    color: #6272a4;
}

.code-string {
    color: #f1fa8c;
}

.code-property {
    color: #ff79c6;
}

.code-number {
    color: #bd93f9;
}

/* Response section */
.code-response {
    background: #282a36;
    border-top: 1px solid #44475a;
}

.response-header {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.response-title {
    color: #f8f8f2;
    font-size: 0.9rem;
    font-weight: 500;
}

.response-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
}

.response-status.success {
    background: rgba(80, 250, 123, 0.2);
    color: #50fa7b;
}

.response-json {
    margin: 0;
    padding: 20px;
    color: #f8f8f2;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* API Actions */
.api-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.api-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.api-btn.primary {
    background: linear-gradient(135deg, #2196F3, #4CAF50);
    color: white;
}

.api-btn.secondary {
    background: white;
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.api-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* API Integration Steps */
.api-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 180px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2196F3, #4CAF50);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.85rem;
    color: #666;
}

.step-connector {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #2196F3, #4CAF50);
    max-width: 100px;
    position: relative;
    top: -20px;
}

/* Animation for elements */
.feature-card, .code-window {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.feature-card:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.3s;
}

.code-window {
    animation-delay: 0.2s;
}

.api-actions {
    animation-delay: 0.3s;
}

.step-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.step-item:nth-child(1) {
    animation-delay: 0.1s;
}

.step-item:nth-child(3) {
    animation-delay: 0.2s;
}

.step-item:nth-child(5) {
    animation-delay: 0.3s;
}

.step-item:nth-child(7) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .api-showcase {
        grid-template-columns: 1fr;
    }
    
    .api-features-panel {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .api-title {
        font-size: 2rem;
    }
    
    .api-steps {
        flex-direction: column;
        gap: 30px;
    }
    
    .step-connector {
        display: none;
    }
}

@media (max-width: 768px) {
    .api-features-panel {
        grid-template-columns: 1fr;
    }
    
    .api-actions {
        flex-direction: column;
    }
    
    .api-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .api-title {
        font-size: 1.8rem;
    }
    
    .code-tabs {
        flex-wrap: wrap;
    }
    
    .code-tab {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}
