/* ========================================
   TheBitcoinIndex.com - API Page Styles
   ======================================== */

/* Hero Section */
.hero-api {
    padding: 80px 0 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    text-align: center;
}

.hero-api .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-api h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #ffffff;
}

.hero-api .subtitle {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.tertiary-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tertiary-button:hover {
    background-color: #ffffff;
    color: #667eea;
    transform: translateY(-2px);
}

/* API Features */
.api-features {
    padding: 80px 0;
    background-color: #ffffff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 12px;
    background-color: #f9fafb;
    border: 1px solid #e4e7ec;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(16, 24, 40, 0.1);
    border-color: #f79009;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #101828;
}

.feature-card p {
    color: #475467;
    line-height: 1.6;
}

/* Get Started Section */
.get-started-section {
    padding: 80px 0;
    background-color: #f9fafb;
}

.quick-start {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.step {
    text-align: center;
    padding: 32px 24px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e4e7ec;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background-color: #f79009;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #101828;
}

.step p {
    color: #475467;
    margin-bottom: 20px;
    line-height: 1.6;
}

.code-example {
    background-color: #1e293b;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    text-align: left;
}

.code-example pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
}

/* Documentation Section */
.documentation-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.docs-tabs {
    margin-top: 48px;
}

.tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e4e7ec;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #475467;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #f79009;
}

.tab-btn.active {
    color: #f79009;
    border-bottom-color: #f79009;
}

.tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #101828;
}

.tab-panel p {
    color: #475467;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Endpoints List */
.endpoints-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.endpoint-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e4e7ec;
}

.endpoint-method {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.endpoint-method.get {
    background-color: #d1fae5;
    color: #065f46;
}

.endpoint-path {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    color: #101828;
    font-weight: 600;
    flex: 1;
}

.endpoint-description {
    color: #475467;
    font-size: 14px;
}

/* Authentication Example */
.auth-example {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
}

.auth-example h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #101828;
}

.auth-example pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 12px 0;
}

/* Rate Limits Table */
.rate-limits-table {
    overflow-x: auto;
    margin-top: 24px;
}

.rate-limits-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1);
}

.rate-limits-table th,
.rate-limits-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e4e7ec;
}

.rate-limits-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #101828;
}

.rate-limits-table td {
    color: #475467;
}

/* Examples */
.examples-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e4e7ec;
}

.example-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #475467;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.example-tab:hover {
    color: #f79009;
}

.example-tab.active {
    color: #f79009;
    border-bottom-color: #f79009;
}

.example-content {
    min-height: 200px;
}

.example-panel {
    display: none;
}

.example-panel.active {
    display: block;
}

.example-panel pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
}

/* Pricing Section */
.pricing-section {
    padding: 80px 0;
    background-color: #f9fafb;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.pricing-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 32px 24px;
    border: 1px solid #e4e7ec;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(16, 24, 40, 0.1);
}

.pricing-card.featured {
    border-color: #f79009;
    box-shadow: 0 4px 16px rgba(247, 144, 9, 0.1);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f79009;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.plan-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #101828;
}

.plan-price {
    margin-bottom: 32px;
}

.plan-price .currency {
    font-size: 24px;
    color: #475467;
    vertical-align: top;
}

.plan-price .amount {
    font-size: 48px;
    font-weight: 700;
    color: #101828;
}

.plan-price .period {
    font-size: 16px;
    color: #475467;
}

.plan-features {
    margin-bottom: 32px;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    padding: 8px 0;
    color: #475467;
    border-bottom: 1px solid #f2f4f7;
}

.plan-features li:last-child {
    border-bottom: none;
}

/* API Status */
.api-status {
    padding: 80px 0;
    background-color: #ffffff;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e4e7ec;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.online {
    background-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.status-indicator.offline {
    background-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.status-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #101828;
}

.status-info p {
    font-size: 14px;
    color: #475467;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-api h1 {
        font-size: 36px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .tertiary-button {
        width: 100%;
        max-width: 280px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .quick-start {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .endpoint-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .endpoint-method {
        align-self: flex-start;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-api {
        padding: 60px 0 48px;
    }
    
    .hero-api h1 {
        font-size: 28px;
    }
    
    .hero-api .subtitle {
        font-size: 16px;
    }
    
    .feature-card,
    .step,
    .pricing-card {
        padding: 24px 16px;
    }
    
    .code-example,
    .auth-example pre,
    .example-panel pre {
        padding: 12px;
        font-size: 12px;
    }
}
