/* ===================================
   GunnyZone - Premium Article Styles
   Giao diện bài viết cao cấp
   Version: 2.0.0
   =================================== */

/* ===== Article Page Layout ===== */
.article-page {
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
}

.article-page .container {
    max-width: 1400px;
    padding: 40px 20px;
}

/* ===== Article Content Card ===== */
.article-content {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    position: relative;
}

.article-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== Article Header ===== */
.article-header {
    padding: 50px 50px 40px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255,107,53,0.03), rgba(78,204,163,0.03));
    position: relative;
}

.article-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50px;
    right: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin: 0 0 20px;
    line-height: 1.2;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.article-meta span,
.article-meta time {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-color);
    border-radius: 20px;
    font-weight: 500;
}

.article-meta span:hover,
.article-meta time:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    transition: var(--transition);
}

/* ===== Table of Contents ===== */
.table-of-contents {
    background: linear-gradient(135deg, rgba(26,26,46,0.02), rgba(255,107,53,0.02));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 50px;
    position: relative;
    overflow: hidden;
}

.table-of-contents::before {
    content: '📑';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.1;
}

.table-of-contents h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin: 0 0 20px;
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-of-contents h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.table-of-contents li {
    margin: 0;
    padding: 0;
}

.table-of-contents a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.table-of-contents a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.table-of-contents a:hover {
    background: rgba(255,107,53,0.08);
    color: var(--primary-color);
    padding-left: 24px;
}

.table-of-contents a:hover::before {
    transform: scaleY(1);
}

/* ===== Article Body ===== */
.article-body {
    padding: 50px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-color);
}

.article-body h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin: 50px 0 25px;
    padding: 0 0 15px;
    border-bottom: 3px solid var(--primary-color);
    font-weight: 700;
    position: relative;
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.article-body h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin: 35px 0 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-body h3::before {
    content: '▸';
    color: var(--primary-color);
    font-size: 1.5rem;
}

.article-body p {
    margin: 0 0 20px;
    text-align: justify;
}

.article-body strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== Info Box ===== */
.info-box {
    background: linear-gradient(135deg, rgba(78,204,163,0.08), rgba(255,107,53,0.08));
    border: 2px solid var(--accent-color);
    border-radius: 16px;
    padding: 25px 30px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
}

.info-box::before {
    content: '💡';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.info-box h3 {
    margin: 0 0 15px;
    color: var(--accent-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box ul {
    margin: 0;
    padding-left: 25px;
    list-style: none;
}

.info-box li {
    margin: 10px 0;
    padding-left: 10px;
    position: relative;
}

.info-box li::before {
    content: '✓';
    position: absolute;
    left: -20px;
    color: var(--accent-color);
    font-weight: bold;
}

/* ===== CTA Box ===== */
.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(255,107,53,0.3);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-box > * {
    position: relative;
    z-index: 1;
}

.cta-box .btn {
    margin: 10px;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.cta-box .btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.cta-box .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* ===== Tables ===== */
.servers-comparison-table,
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.servers-comparison-table thead,
.article-body table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.servers-comparison-table th,
.article-body table th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.servers-comparison-table td,
.article-body table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.servers-comparison-table tbody tr,
.article-body table tbody tr {
    transition: all 0.2s ease;
}

.servers-comparison-table tbody tr:hover,
.article-body table tbody tr:hover {
    background: linear-gradient(90deg, rgba(255,107,53,0.05), transparent);
    transform: translateX(5px);
}

.servers-comparison-table tbody tr:last-child td,
.article-body table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Code Blocks ===== */
.article-body code {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 3px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    display: inline-block;
}

/* ===== Lists ===== */
.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body ul {
    list-style: none;
}

.article-body ul li {
    position: relative;
    padding-left: 25px;
    margin: 12px 0;
}

.article-body ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.article-body ol {
    counter-reset: item;
    list-style: none;
}

.article-body ol li {
    position: relative;
    padding-left: 35px;
    margin: 12px 0;
    counter-increment: item;
}

.article-body ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 2px;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 26px;
    font-size: 13px;
    font-weight: 700;
}

/* ===== Blockquote ===== */
.article-body blockquote {
    margin: 30px 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(26,26,46,0.03), rgba(255,107,53,0.03));
    border-left: 4px solid var(--primary-color);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    position: relative;
}

.article-body blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.article-body blockquote p {
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ===== Related Articles ===== */
.related-articles {
    padding: 50px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255,107,53,0.02), rgba(78,204,163,0.02));
}

.related-articles h3 {
    font-size: 1.6rem;
    color: var(--secondary-color);
    margin: 0 0 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-articles h3::before {
    content: '📚';
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.related-card:hover::before {
    transform: scaleX(1);
}

.related-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.related-card h4 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.5;
    font-weight: 600;
    transition: color 0.2s ease;
}

.related-card:hover h4 {
    color: var(--primary-color);
}

/* ===== Footer ===== */
.article-footer {
    padding: 40px 50px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    text-align: center;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .article-header,
    .article-body,
    .related-articles {
        padding: 40px 30px;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .table-of-contents {
        margin: 30px 30px;
    }
}

@media (max-width: 768px) {
    .article-page .container {
        padding: 20px 15px;
    }
    
    .article-header,
    .article-body,
    .related-articles {
        padding: 30px 20px;
    }
    
    .article-header h1 {
        font-size: 1.6rem;
    }
    
    .article-meta {
        gap: 10px;
    }
    
    .article-meta span,
    .article-meta time {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .table-of-contents {
        margin: 20px;
        padding: 20px;
    }
    
    .table-of-contents h2 {
        font-size: 1.2rem;
    }
    
    .article-body h2 {
        font-size: 1.4rem;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
    }
    
    .cta-box .btn {
        display: block;
        margin: 10px 0;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Print Styles ===== */
@media print {
    .article-page {
        background: white;
    }
    
    .article-content {
        box-shadow: none;
    }
    
    .table-of-contents,
    .related-articles,
    .cta-box {
        display: none;
    }
}
