:root {
    --color-blue: var(--cp-primary, #3498db);
    --color-green: var(--cp-accent, #2ecc71);
    --color-dark: var(--cp-text, #2c3e50);
    --color-gray: var(--cp-muted, #95a5a6);
    --shadow: var(--cp-shadow-soft, 0 4px 12px rgba(0, 0, 0, 0.05));
    --shadow-hover: var(--cp-shadow-card, 0 10px 25px rgba(0, 0, 0, 0.1));
    --border-radius: var(--cp-radius, 8px);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-dark);
    background: linear-gradient(145deg, #f5f9ff, #e8f2ff);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

.article-page {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    padding: 3rem;
    margin-bottom: 3rem;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 2rem;
    color: var(--color-gray);
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    flex-wrap: wrap;
}

.article-meta i {
    margin-right: 0.3rem;
    color: var(--color-blue);
}

.article-main-image {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f0f0f0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.article-contents {
    background: #f8fafd;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--color-blue);
}

.article-contents h3 {
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.article-contents ul {
    list-style: none;
    padding: 0;
}

.article-contents li {
    margin-bottom: 0.5rem;
}

.article-contents a {
    color: var(--color-blue);
    text-decoration: none;
}

.article-contents a:hover {
    text-decoration: underline;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    margin: 2rem 0 1rem;
    color: var(--color-dark);
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content th {
    background: var(--color-dark);
    color: white;
    padding: 1rem;
}

.article-content td {
    padding: 1rem;
    border: 1px solid #eee;
}

.article-gallery {
    margin: 3rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background: #f0f0f0;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--color-blue);
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-link {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.rating-stars {
    display: flex;
    gap: 0.3rem;
    font-size: 1.2rem;
    color: #ffc107;
    cursor: pointer;
}

.rating-stars i {
    transition: transform 0.2s;
}

.rating-stars i:hover {
    transform: scale(1.2);
}

.rating-value {
    color: var(--color-gray);
}

@media (max-width: 768px) {
    .article-page {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        gap: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}