* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

body::before {
    left: 0;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.15) 0%, transparent 100%);
}

body::after {
    right: 0;
    background: linear-gradient(270deg, rgba(0, 255, 136, 0.15) 0%, transparent 100%);
}

.side-decoration {
    position: fixed;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: -2;
}

.side-decoration.left {
    left: 0;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 255, 255, 0.05) 25%,
        rgba(0, 255, 255, 0.1) 50%,
        rgba(0, 255, 255, 0.05) 75%,
        transparent 100%);
    animation: flowDown 8s linear infinite;
}

.side-decoration.right {
    right: 0;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0, 255, 136, 0.05) 25%,
        rgba(0, 255, 136, 0.1) 50%,
        rgba(0, 255, 136, 0.05) 75%,
        transparent 100%);
    animation: flowDown 10s linear infinite;
}

@keyframes flowDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    position: relative;
    z-index: 1;
}

.header {
    background: linear-gradient(90deg, rgba(26, 26, 46, 0.98) 0%, rgba(26, 26, 46, 0.95) 50%, rgba(26, 26, 46, 0.98) 100%);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding: 10px 0;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.15);
    border-left: none;
    border-right: none;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.search-container {
    flex: 1;
    max-width: 300px;
    margin: 0 30px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 30px;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e0e0e0;
    font-size: 13px;
    padding: 6px;
}

.search-input::placeholder {
    color: #888;
}

.search-button {
    background: transparent;
    border: none;
    color: #00ffff;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    transition: all 0.3s ease;
}

.search-button:hover {
    color: #00ff88;
    transform: scale(1.05);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active {
    color: #00ffff;
    background: rgba(0, 255, 255, 0.15);
}

.nav-link.active::before {
    width: 80%;
}

.main-content {
    padding: 60px 0 40px 0;
    min-height: calc(100vh - 140px);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #00ffff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-left: 20px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(180deg, #00ffff, #00ff88);
    border-radius: 2px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
    justify-content: center;
}

.article-card {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.2);
}

.article-card:hover::before {
    opacity: 1;
}

.article-card-header {
    margin-bottom: 15px;
}

.article-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.article-title {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-date {
    font-size: 13px;
    color: #666;
}

.article-read {
    font-size: 13px;
    color: #00ffff;
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.category-card {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.15);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-name {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.category-count {
    font-size: 14px;
    color: #00ffff;
}

.collections-list {
    margin-top: 30px;
}

.collection-item {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collection-item:hover {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.15);
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.collection-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.collection-article-count {
    color: #00ffff;
    font-size: 14px;
}

.collection-description {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
}

.about-content {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
}

.about-section {
    margin-bottom: 30px;
}

.about-section h3 {
    font-size: 24px;
    color: #00ffff;
    margin-bottom: 15px;
}

.about-section p {
    color: #b0b0b0;
    line-height: 1.8;
    font-size: 16px;
}

.footer {
    background: rgba(26, 26, 46, 0.95);
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding: 10px 0;
    text-align: center;
    margin-top: 20px;
}

.footer-content {
    display: flex;
    align-content: center;
    justify-content: center;
}

.footer-content p {
    color: #666;
    font-size: 14px;
}

.article-detail-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.article-detail-header {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}

.article-detail-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 16px;
}

.article-detail-content {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px;
    line-height: 1.8;
    font-size: 16px;
    color: #e0e0e0;
}

.article-detail-content h2 {
    color: #00ffff;
    margin: 30px 0 15px 0;
    font-size: 24px;
}

.article-detail-content h3 {
    color: #00ff88;
    margin: 25px 0 12px 0;
    font-size: 20px;
}

.article-detail-content p {
    margin-bottom: 15px;
}

.article-detail-content code {
    background: rgba(0, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
}

.article-detail-content pre {
    background: rgba(0, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.article-detail-content pre code {
    background: transparent;
    padding: 0;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.nav-button {
    flex: 1;
    padding: 15px 30px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: #00ffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.nav-button:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.2);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    font-size: 18px;
    color: #00ffff;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 255, 255, 0.3);
    border-top-color: #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.back-button-wrap {
    position: absolute;
    top: 0;
    left: -75px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 255, 255, 0.15);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 10px;
    color: #00ffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.15);
}

.back-button:hover {
    background: rgba(0, 255, 255, 0.25);
    border-color: rgba(0, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.25);
}

@media (max-width: 1024px) {
    .header-content {
        max-width: 1200px;
        padding: 0 40px;
    }

    .search-container {
        max-width: 250px;
        margin: 0 15px;
    }

    .container {
        max-width: 1200px;
        padding: 0 40px;
    }

    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    body::before,
    body::after {
        width: 100px;
    }

    .side-decoration {
        width: 60px;
    }

    .header-content {
        max-width: 100%;
        padding: 0 20px;
        flex-direction: column;
        gap: 15px;
    }

    .search-container {
        max-width: 100%;
        margin: 10px 0;
        width: 100%;
    }

    .search-box {
        max-width: 100%;
    }

    .container {
        max-width: 100%;
        padding: 0 20px;
    }

    .nav {
        gap: 15px;
    }

    .nav-link {
        font-size: 14px;
        padding: 6px 12px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .section-title {
        font-size: 28px;
    }

    .article-detail-title {
        font-size: 28px;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .grid-pattern {
        background-size: 30px 30px;
    }
}
