<?php
// public/assets/css/style.css

/* Global Reset & Base */
:root {
    --primary-color: #009688;
    --primary-hover: #00796b;
    --secondary-color: #ff5722;
    --text-main: #333;
    --text-secondary: #666;
    --bg-light: #f4f6f8;
    --border-color: #eee;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: var(--primary-color); }
ul { list-style: none; padding: 0; margin: 0; }
.clearfix::after { content: ""; display: table; clear: both; }
.container { width: 1200px; margin: 0 auto; position: relative; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover { background-color: var(--primary-hover); color: var(--white); }
.btn-vip { background-color: var(--secondary-color); }
.btn-vip:hover { background-color: #e64a19; }
.btn-outline { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: var(--white); }

/* Header */
header {
    background: var(--white);
    border-bottom: 2px solid var(--primary-color);
    padding: 15px 0;
}
.logo {
    float: left;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 60px;
    line-height: 40px;
}
.search-bar {
    float: left;
    position: relative;
    width: 400px;
    margin-top: 2px;
}
.search-bar input {
    width: 100%;
    height: 36px;
    border: 2px solid var(--primary-color);
    padding: 0 80px 0 15px;
    border-radius: 2px;
    outline: none;
}
.search-bar button {
    position: absolute;
    right: 0;
    top: 0;
    width: 70px;
    height: 36px;
    background: var(--primary-color);
    border: none;
    color: var(--white);
    cursor: pointer;
}
.user-actions {
    float: right;
    line-height: 40px;
    font-size: 14px;
}
.user-actions a { margin-left: 15px; }

/* Navigation */
.nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav ul { display: flex; }
.nav li {
    padding: 0 25px;
    line-height: 50px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
}
.nav li:hover, .nav li.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #009688 0%, #4db6ac 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
}
.banner h1 { font-size: 36px; margin-bottom: 15px; font-weight: normal; }
.banner p { font-size: 18px; opacity: 0.9; margin-bottom: 25px; }
.banner .btn-join {
    padding: 12px 40px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 18px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.banner .btn-join:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* Content Section */
.section-title {
    font-size: 20px;
    font-weight: bold;
    margin: 30px 0 20px;
    display: flex;
    align-items: center;
}
.section-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 24px;
    background: var(--primary-color);
    margin-right: 10px;
    border-radius: 3px;
}

/* Document List - Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns on PC */
    gap: 20px;
    margin-bottom: 40px;
}
.doc-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}
.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}
.doc-icon {
    height: 120px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #888;
}
.doc-info { padding: 15px; }
.doc-title {
    font-size: 14px;
    height: 40px;
    line-height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    color: #333;
}
.doc-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}
.doc-price { color: var(--secondary-color); font-weight: bold; font-size: 14px; }
.file-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    text-transform: uppercase;
}

/* Document List - List Style (Target Site Style) */
.doc-list-simple {
    background: var(--white);
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.doc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}
.doc-row:last-child { border-bottom: none; }
.doc-row-left { display: flex; align-items: center; flex: 1; min-width: 0; }
.doc-type-icon {
    padding: 2px 5px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    margin-right: 10px;
    background: #999;
}
.doc-type-icon.docx { background: #4b89dc; }
.doc-type-icon.pptx { background: #d24726; }
.doc-type-icon.pdf { background: #e74c3c; }
.doc-type-icon.xlsx { background: #217346; }

.doc-row-title {
    font-size: 15px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-row-right { margin-left: 20px; font-size: 12px; color: #999; display: flex; align-items: center; }
.doc-row-price { color: var(--secondary-color); font-weight: bold; margin-right: 15px; font-size: 14px; }

/* Detail Page */
.detail-box {
    background: var(--white);
    padding: 40px;
    margin-top: 20px;
    box-shadow: var(--shadow);
    border-radius: 4px;
}
.detail-header h1 { font-size: 24px; margin-bottom: 20px; }
.detail-meta {
    background: #f9f9f9;
    padding: 15px;
    color: #666;
    margin-bottom: 30px;
    border-radius: 4px;
    display: flex;
    gap: 30px;
}
.preview-content {
    min-height: 400px;
    padding: 30px;
    border: 1px solid #eee;
    background: #fff;
    margin-bottom: 30px;
}
.lock-overlay {
    background: #f8f9fa;
    padding: 40px;
    text-align: center;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* Footer */
footer {
    background: #333;
    color: #999;
    padding: 40px 0;
    margin-top: 50px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .container { width: 100%; padding: 0 15px; }
    
    /* Header Mobile */
    header { padding: 10px 0; }
    .logo { float: none; display: block; text-align: center; margin: 0 0 10px; font-size: 22px; }
    .search-bar { float: none; width: 100%; margin: 0 0 10px; }
    .user-actions { float: none; text-align: center; margin-bottom: 5px; }
    
    /* Nav Mobile */
    .nav { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .nav li { padding: 0 15px; }
    
    /* Banner Mobile */
    .banner { padding: 30px 0; }
    .banner h1 { font-size: 24px; }
    .banner p { font-size: 14px; }
    
    /* Doc List Mobile */
    .doc-grid { grid-template-columns: 1fr; gap: 15px; }
    .doc-card { display: flex; height: 100px; }
    .doc-icon { width: 80px; height: 100%; font-size: 30px; }
    .doc-info { flex: 1; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; }
    .doc-title { height: 40px; font-size: 14px; white-space: normal; line-height: 20px; }
    
    .doc-row { flex-direction: column; align-items: flex-start; }
    .doc-row-right { margin-left: 0; margin-top: 5px; width: 100%; justify-content: space-between; }
    
    /* Detail Mobile */
    .detail-box { padding: 20px; }
    .detail-meta { flex-direction: column; gap: 10px; }
}
