/* =============================================
   HTTP STATUS CODES PAGE STYLES
   ============================================= */

/* Hero Section */
.http-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 120px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.http-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 136, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 136, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 136, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.http-hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.http-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight-http {
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.hero-stats .stat {
    text-align: center;
}

.hero-stats .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #00ff88;
}

.hero-stats .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Content Sections */
.content-section {
    padding: 80px 20px;
}

.content-section.alt-bg {
    background: #f8f9fa;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-icon {
    font-size: 1.5rem;
}

.section-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 700px;
}

/* Intro Grid */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.intro-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.intro-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.intro-card h3 {
    font-size: 1.25rem;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.intro-card p {
    color: #666;
    line-height: 1.7;
}

/* Methods Grid */
.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.method-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid;
    transition: transform 0.3s ease;
}

.method-card:hover {
    transform: translateX(5px);
}

.method-card.get { border-left-color: #10b981; }
.method-card.post { border-left-color: #f59e0b; }
.method-card.put { border-left-color: #3b82f6; }
.method-card.patch { border-left-color: #8b5cf6; }
.method-card.delete { border-left-color: #ef4444; }
.method-card.options { border-left-color: #64748b; }

.method-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.method-name {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a2e;
}

.method-safe {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.method-unsafe {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.method-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.method-card .code-block {
    background: #1a1a2e;
    padding: 12px 16px;
    border-radius: 8px;
    overflow-x: auto;
}

.method-card .code-block code {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #e0e0e0;
    white-space: pre;
}

/* Categories Overview */
.categories-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    color: #fff;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-card.cat-1xx { background: linear-gradient(135deg, #64748b, #475569); }
.category-card.cat-2xx { background: linear-gradient(135deg, #10b981, #059669); }
.category-card.cat-3xx { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.category-card.cat-4xx { background: linear-gradient(135deg, #f59e0b, #d97706); }
.category-card.cat-5xx { background: linear-gradient(135deg, #ef4444, #dc2626); }

.category-range {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: 'Fira Code', monospace;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    color: #fff;
}

.badge-1xx { background: linear-gradient(135deg, #64748b, #475569); }
.badge-2xx { background: linear-gradient(135deg, #10b981, #059669); }
.badge-3xx { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.badge-4xx { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-5xx { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.status-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.status-card.popular {
    border-left: 4px solid #667eea;
}

.status-code {
    font-family: 'Fira Code', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: #667eea;
    min-width: 60px;
}

.status-info h3 {
    font-size: 1.1rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.status-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.status-usage {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.usage-tag {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Fira Code', monospace;
}

.status-example {
    background: #1a1a2e;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.status-example code {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #10b981;
}

.status-cause {
    background: rgba(245, 158, 11, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    border-left: 3px solid #f59e0b;
}

.status-cause strong {
    color: #1a1a2e;
}

.status-cause code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

/* Section specific colors */
.status-1xx .status-code { color: #64748b; }
.status-2xx .status-code { color: #10b981; }
.status-3xx .status-code { color: #3b82f6; }
.status-4xx .status-code { color: #f59e0b; }
.status-5xx .status-code { color: #ef4444; }

#1xx .status-card { border-left: 4px solid #64748b; }
#2xx .status-card.popular { border-left: 4px solid #10b981; }
#3xx .status-card.popular { border-left: 4px solid #3b82f6; }
#4xx .status-card.popular { border-left: 4px solid #f59e0b; }
#5xx .status-card.popular { border-left: 4px solid #ef4444; }

/* Headers Grid */
.headers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.header-category {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-category h3 {
    font-size: 1.25rem;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.header-category table {
    width: 100%;
    border-collapse: collapse;
}

.header-category td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.header-category td:first-child {
    width: 50%;
}

.header-category td code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.header-category td:last-child {
    color: #666;
    font-size: 0.9rem;
}

/* Examples Grid */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.example-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.example-card h3 {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 1.1rem;
}

.example-card .code-block {
    background: #1a1a2e;
    padding: 20px;
    position: relative;
    max-height: 400px;
    overflow-y: auto;
}

.example-card .code-block code {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #e0e0e0;
    white-space: pre;
    display: block;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Cheat Sheet */
.cheatsheet-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.cheat-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid;
    transition: transform 0.2s ease;
}

.cheat-row:hover {
    transform: translateX(5px);
}

.cheat-row.success { border-left-color: #10b981; }
.cheat-row.redirect { border-left-color: #3b82f6; }
.cheat-row.error-client { border-left-color: #f59e0b; }
.cheat-row.error-server { border-left-color: #ef4444; }

.cheat-code {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    min-width: 50px;
}

.cheat-row.success .cheat-code { color: #10b981; }
.cheat-row.redirect .cheat-code { color: #3b82f6; }
.cheat-row.error-client .cheat-code { color: #f59e0b; }
.cheat-row.error-server .cheat-code { color: #ef4444; }

.cheat-name {
    font-weight: 600;
    color: #1a1a2e;
    min-width: 100px;
}

.cheat-desc {
    color: #666;
    font-size: 0.9rem;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .http-hero {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
}

[data-theme="dark"] .content-section.alt-bg {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .intro-card,
[data-theme="dark"] .method-card,
[data-theme="dark"] .status-card,
[data-theme="dark"] .header-category,
[data-theme="dark"] .example-card,
[data-theme="dark"] .cheat-row {
    background: #1e1e2e;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .intro-card h3,
[data-theme="dark"] .status-info h3,
[data-theme="dark"] .header-category h3,
[data-theme="dark"] .cheat-name {
    color: #fff;
}

[data-theme="dark"] .intro-card p,
[data-theme="dark"] .method-card p,
[data-theme="dark"] .status-info p,
[data-theme="dark"] .header-category td:last-child,
[data-theme="dark"] .cheat-desc,
[data-theme="dark"] .section-description {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .status-cause {
    background: rgba(245, 158, 11, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .status-cause strong {
    color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .http-hero {
        padding: 100px 20px 60px;
    }
    
    .http-hero h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .hero-stats .stat-number {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 50px 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .methods-grid,
    .status-grid,
    .headers-grid,
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .status-card {
        flex-direction: column;
        gap: 10px;
    }
    
    .status-code {
        font-size: 1.5rem;
    }
    
    .cheatsheet-compact {
        grid-template-columns: 1fr;
    }
    
    .categories-overview {
        grid-template-columns: 1fr 1fr;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .category-range {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .categories-overview {
        grid-template-columns: 1fr;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
    }
    
    .cheat-row {
        flex-wrap: wrap;
    }
    
    .cheat-desc {
        width: 100%;
        margin-top: 5px;
    }
}
