/* Educational Platform Template - Green & Modern Design */

:root {
    --primary: #4a9d6f;
    --primary-dark: #3a7d5f;
    --secondary: #ff6b35;
    --accent: #f0f4f1;
    --dark: #1a2e1a;
    --darker: #ffffff;
    --light: #2d3d2d;
    --gray: #6b7a6f;
    --gray-light: #5a6a5a;
    --border: #d4e1d4;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-lg: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary) 0%, #3a8f63 100%);
    --radius: 8px;
    --radius-sm: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bg-primary: #f5f8f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --hot-color: #ff6b35;
    --top-color: #d64444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--light);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}

/* Header Styles */
.top-nav {
    background: var(--primary);
    padding: 0.5rem 0;
    z-index: 1001;
    box-shadow: 0 2px 6px var(--shadow-lg);
}

.top-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    transition: var(--transition);
    white-space: nowrap;
}

.top-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.top-nav .nav-badge {
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
}

.header-main {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
    box-shadow: 0 1px 3px var(--shadow);
}

.header-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.brand-link {
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.brand-link:hover {
    transform: scale(1.03);
}

.brand-title {
    font-size: 24px;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1px;
}

.domain-area {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(74, 157, 111, 0.08) 0%, rgba(74, 157, 111, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(74, 157, 111, 0.25);
}

.domain-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.domain-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Container */
.container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 15px;
}

.content {
    padding: 15px 0;
}

/* Navigation Container */
.nav-container {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
}

.nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border);
}

.nav-row:last-child {
    border-bottom: none;
}

.nav-row .nav-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--dark);
    white-space: nowrap;
    width: 10%;
    text-align: center;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    flex-shrink: 0;
}

.nav-row .nav-links {
    font-size: 13px;
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 10px;
    align-items: center;
}

.nav-row .nav-links a {
    display: inline-block;
    color: var(--gray-light);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: 5px;
    transition: var(--transition);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 42px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
}

.nav-row .nav-links a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 3px 8px rgba(74, 157, 111, 0.2);
}

.nav-row .nav-links a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 3px 8px rgba(74, 157, 111, 0.2);
    font-weight: 600;
}

/* Search Box */
.search-box {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
}

.search-box form {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--dark);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.search-box input[type="text"]:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 157, 111, 0.1);
}

.search-box input[type="text"]::placeholder {
    color: var(--gray);
}

.search-box button {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-box button:hover {
    background: var(--primary-dark);
    box-shadow: 0 5px 14px rgba(74, 157, 111, 0.2);
}

.search-box button:active {
    transform: translateY(0);
}

/* Tag Container */
.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px var(--shadow);
}

.tag-link {
    padding: 6px 12px;
    background: var(--bg-primary);
    border-radius: 14px;
    color: var(--gray-light);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.tag-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(74, 157, 111, 0.15);
}

/* Section Heading */
.article-section {
    margin-bottom: 20px;
}

.section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.section-heading {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.2px;
    color: var(--dark);
}

.section-heading a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.section-heading a:hover {
    color: var(--primary);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
}

.content-grid li {
    position: relative;
    animation: fadeInUp 0.5s ease backwards;
}

.content-grid li:nth-child(1) { animation-delay: 0.05s; }
.content-grid li:nth-child(2) { animation-delay: 0.1s; }
.content-grid li:nth-child(3) { animation-delay: 0.15s; }
.content-grid li:nth-child(4) { animation-delay: 0.2s; }
.content-grid li:nth-child(5) { animation-delay: 0.25s; }
.content-grid li:nth-child(6) { animation-delay: 0.3s; }
.content-grid li:nth-child(7) { animation-delay: 0.35s; }
.content-grid li:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 600 / 350;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px var(--shadow);
}

.content-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.content-item:hover {
    box-shadow: 0 6px 16px rgba(74, 157, 111, 0.12);
}

.content-item:hover img {
    transform: scale(1.1);
}


.content-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-item:hover::after {
    opacity: 1;
}

.item-title {
    padding: 10px 0;
}

.item-title h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--dark);
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-title a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.item-title a:hover {
    color: var(--primary);
}

/* Detail Box */
.detail-info {
    line-height: 1.8;
    text-align: center;
    padding: 20px;
    font-size: 17px;
    margin: 20px 0;
    word-break: break-all;
    background: linear-gradient(135deg, rgba(74, 157, 111, 0.05) 0%, rgba(74, 157, 111, 0.03) 100%);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.detail-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-right: 8px;
    transition: var(--transition);
}

.detail-info a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.detail-info b {
    color: var(--dark);
    word-wrap: break-word;
}

/* Details Content */
.details-content {
    clear: both;
    font-size: 16px;
    line-height: 1.8;
    padding: 25px;
    background: linear-gradient(135deg, rgba(74, 157, 111, 0.05) 0%, rgba(74, 157, 111, 0.03) 100%);
    border-radius: var(--radius);
    margin: 20px 0;
    border: 1px solid rgba(74, 157, 111, 0.15);
}

.details-content br {
    line-height: 0.8;
}

/* Torrent Grid */
.torrent-grid {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.torrent-grid picture,
.torrent-grid img {
    width: 100%;
    height: auto;
    display: block;
}

/* Download Section */
.download {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px 0;
    margin: 15px 0;
}

.btn-download {
    padding: 12px 24px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-download:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 157, 111, 0.2);
}

.btn-download:active {
    transform: translateY(1px);
}

/* Share Section */
.share-box {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 15px 0;
    align-items: center;
}

.share-url-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.share-label-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.share-url-text {
    font-size: 12px;
    color: var(--dark);
    word-break: break-all;
    font-family: 'Monaco', 'Courier New', monospace;
}

.btn-share {
    padding: 11px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-share:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(74, 157, 111, 0.2);
}

.share-icon {
    font-size: 16px;
}

/* Video Container */
.player-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 15px;
    background: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Pagination */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 18px 0;
    flex-wrap: wrap;
}

.page-nav a,
.page-nav span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--dark);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
    min-width: 40px;
    text-align: center;
}

.page-nav a {
    background: var(--bg-secondary);
    cursor: pointer;
}

.page-nav a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    cursor: default;
}

/* Footer */
.footer-area {
    padding: 25px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 30px;
    background: var(--bg-secondary);
}

.footer-area p {
    margin: 8px 0;
    color: var(--gray);
    font-size: 13px;
}

.footer-area a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-area a:hover {
    color: var(--primary);
}

.links-area {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.links-area dl {
    margin: 0;
}

.links-area dd {
    display: inline-block;
    margin: 4px;
}

.links-area a {
    color: #0066cc;
    text-decoration: none;
    transition: var(--transition);
}

.links-area a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header-main {
        padding: 0.5rem 0;
    }

    .brand-container {
        gap: 8px;
    }

    .brand-title {
        font-size: 20px;
    }

    .domain-area {
        padding: 3px 8px;
        gap: 4px;
    }

    .domain-label {
        font-size: 8px;
    }

    .domain-text {
        font-size: 13px;
    }

    .content {
        padding: 12px 0;
    }

    .nav-row {
        display: flex;
        align-items: stretch;
    }

    .nav-row .nav-label {
        width: 15%;
        font-size: 10px;
        padding: 8px 3px;
    }

    .nav-row .nav-links {
        width: 85%;
        font-size: 11px;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px 5px;
    }

    .nav-row .nav-links a {
        padding: 5px 2px;
        font-size: 12px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .search-box {
        padding: 11px;
    }

    .search-box form {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .search-box input[type="text"] {
        min-width: 100px;
        padding: 9px 12px;
        font-size: 13px;
    }

    .search-box button {
        padding: 9px 12px;
        font-size: 12px;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .item-title {
        padding: 8px 0;
    }

    .item-title h5 {
        font-size: 13px;
    }

    .article-section {
        margin-bottom: 15px;
    }

    .section-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .section-heading {
        font-size: 18px;
    }

    .hot-tags {
        padding: 11px;
        gap: 6px;
    }

    .tag-link {
        padding: 5px 12px;
        font-size: 12px;
    }

    .btn-download {
        padding: 10px 16px;
        font-size: 13px;
    }

    .download {
        padding: 12px 0;
        margin: 12px 0;
        gap: 8px;
    }

    .detail-info {
        padding: 18px;
        font-size: 15px;
        margin: 15px 0;
    }

    .details-content {
        padding: 18px;
        margin: 15px 0;
        font-size: 15px;
    }

    .share-box {
        padding: 12px;
        margin: 15px 0;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .share-url-info {
        gap: 5px;
    }

    .share-label-text {
        font-size: 11px;
    }

    .share-url-text {
        font-size: 11px;
    }

    .btn-share {
        padding: 10px 12px;
        font-size: 12px;
    }

    .share-icon {
        font-size: 16px;
    }

    .page-nav {
        padding: 15px 0;
        gap: 5px;
    }

    .page-nav a,
    .page-nav span {
        padding: 7px 12px;
        font-size: 12px;
        min-width: 36px;
    }

    .footer-area {
        padding: 20px 0;
        margin-top: 20px;
    }

    .player-wrapper {
        height: 56.25vw;
        max-height: 400px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .header-main {
        padding: 0.4rem 0;
    }

    .brand-container {
        gap: 6px;
    }

    .brand-title {
        font-size: 18px;
    }

    .domain-area {
        padding: 2px 6px;
        gap: 3px;
        border-width: 1px;
    }

    .domain-label {
        font-size: 7px;
    }

    .domain-text {
        font-size: 12px;
    }

    .nav-row .nav-label {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .nav-row .nav-links {
        width: 85%;
        gap: 3px;
        padding: 6px 3px;
    }

    .nav-row .nav-links a {
        padding: 4px 1px;
        font-size: 12px;
        width: calc((100% - 9px) / 4);
    }

    .search-box input[type="text"] {
        min-width: 80px;
        padding: 9px 11px;
        font-size: 12px;
    }

    .search-box button {
        padding: 9px 10px;
        font-size: 11px;
    }

    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .item-title h5 {
        font-size: 12px;
    }

    .section-heading {
        font-size: 16px;
    }

    .download {
        padding: 10px 0;
        gap: 6px;
    }

    .btn-download {
        padding: 9px 12px;
        font-size: 12px;
    }

    .detail-info {
        padding: 16px;
        font-size: 14px;
        margin: 12px 0;
    }

    .details-content {
        padding: 16px;
        margin: 12px 0;
        font-size: 14px;
    }

    .share-box {
        padding: 10px;
        margin: 12px 0;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .share-url-info {
        gap: 4px;
    }

    .share-label-text {
        font-size: 10px;
    }

    .share-url-text {
        font-size: 10px;
    }

    .btn-share {
        padding: 9px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .share-icon {
        font-size: 14px;
    }

    .player-wrapper {
        height: 56.25vw;
        max-height: 300px;
        margin-bottom: 12px;
    }
}

/* Hide Utilities */
.hide_mobile {
    display: block;
}

.hide_pc {
    display: block;
}

@media (max-width: 768px) {
    .hide_mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide_pc {
        display: none !important;
    }
}

/* Loading Image */
img[data-original] {
    background: var(--bg-primary);
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
