/**
 * Note Library - CSS Styles
 */

/* Header */
.library-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.library-header .header-content {
    max-width: 800px;
    margin: 0 auto;
}

.library-header .back-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.library-header .back-link:hover {
    color: white;
}

.library-header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

.library-header .subtitle {
    opacity: 0.9;
    margin: 0;
}

/* Main */
.library-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Intro Section */
.intro-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    border-left: 4px solid #10b981;
}

.intro-box h2 {
    border: none;
    padding: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.intro-box p {
    margin: 0;
    color: #065f46;
    line-height: 1.7;
}

/* Folder Structure */
.folder-tree {
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

.folder-item {
    padding: 0.5rem 0;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.folder-item:not(.root) {
    padding-left: 1.5rem;
}

.folder-item.file {
    padding-left: 1.5rem;
}

.folder-icon {
    font-size: 1rem;
}

.folder-name {
    color: #fbbf24;
}

.folder-item.file .folder-name {
    color: #60a5fa;
}

.folder-desc {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Download Section */
.section-subtitle {
    font-size: 1.1rem;
    color: #475569;
    margin: 2rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid #10b981;
}

.section-subtitle:first-of-type {
    margin-top: 0;
}

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

.download-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.download-card.featured {
    border-color: #10b981;
    background: linear-gradient(to bottom, #ecfdf5, white);
}

.download-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.download-card h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.download-card > p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.download-card .features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.download-card .features li {
    font-size: 0.85rem;
    color: #475569;
    padding: 0.25rem 0;
}

.download-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #059669;
}

/* File Category & List */
.file-category {
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-title {
    font-size: 1rem;
    color: #1e293b;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-list.compact {
    gap: 0.25rem;
}

.file-list.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: background 0.2s;
}

.file-item:hover {
    background: #f1f5f9;
}

.file-item.featured {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.file-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.file-name {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 500;
}

.file-desc {
    font-size: 0.8rem;
    color: #64748b;
    flex: 1;
}

.file-download-btn {
    padding: 0.35rem 0.75rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.file-download-btn:hover {
    background: #059669;
}

.student-grid .file-item {
    padding: 0.4rem 0.5rem;
}

.student-grid .file-name {
    font-size: 0.85rem;
    flex: 1;
}

.student-grid .file-download-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.download-all-btn {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.download-all-btn:hover {
    background: #334155;
}

/* Steps Container */
.steps-container {
    display: grid;
    gap: 1.5rem;
}

.step-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-card .step-number {
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.step-card .step-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: #1e293b;
}

.step-card .step-content ol {
    margin: 0;
    padding-left: 1.25rem;
    color: #475569;
}

.step-card .step-content li {
    margin-bottom: 0.5rem;
}

.step-card .step-content code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #0f766e;
}

/* Mission Section */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.mission-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mission-card h3 {
    font-size: 1rem;
    margin: 0 0 1rem 0;
    color: #1e293b;
}

.mission-card.week1 { border-top: 3px solid #84cc16; }
.mission-card.week2 { border-top: 3px solid #22c55e; }
.mission-card.week3 { border-top: 3px solid #14b8a6; }
.mission-card.week4 { border-top: 3px solid #0ea5e9; }

.mission-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mission-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.mission-list li:last-child {
    border-bottom: none;
}

.mission-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
}

/* Shortcut Section */
.shortcut-table {
    overflow-x: auto;
}

.shortcut-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shortcut-table th,
.shortcut-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.shortcut-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
}

.shortcut-table td {
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.shortcut-table tr:last-child td {
    border-bottom: none;
}

.shortcut-table code {
    background: #1e293b;
    color: #fbbf24;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Tips Section */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tip-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tip-card .tip-number {
    background: #10b981;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.tip-card p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
}

.quote {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #10b981;
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    margin: 0;
    font-style: italic;
    color: #065f46;
    font-size: 1.1rem;
}

/* Footer */
.library-footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.library-footer p {
    margin: 0.25rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .library-header h1 {
        font-size: 1.5rem;
    }
    
    .library-main {
        padding: 1rem;
    }
    
    .step-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .download-grid,
    .mission-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
}
