/* ================================================================
   download.css - Page-specific styles
   ================================================================ */

/* ===== Main Container ===== */
        .main-container { max-width: 1200px; margin: 0 auto; padding: 60px 30px; }

        .page-header { text-align: center; margin-bottom: 50px; }
        .page-header h1 { font-size: 38px; font-weight: 900; color: var(--dark); letter-spacing: 3px; margin-bottom: 12px; }
        .page-header .subtitle { font-size: 15px; color: var(--gray-500); letter-spacing: 1px; }
        .page-header .divider { width: 60px; height: 3px; background: var(--gold); margin: 16px auto 0; border-radius: 2px; }

        .download-wrap { max-width: 900px; margin: 0 auto; }

        /* ===== Lock Screen (not logged in / pending) ===== */
        .lock-screen {
            text-align: center; padding: 60px 30px;
        }
        .lock-icon-wrap {
            width: 80px; height: 80px; border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            margin: 0 auto 24px; display: flex; align-items: center; justify-content: center;
            box-shadow: 0 4px 20px rgba(26,60,122,0.25);
        }
        .lock-icon-wrap svg { width: 36px; height: 36px; }
        .lock-icon-wrap.lock-warning {
            background: linear-gradient(135deg, #f39c12, #e67e22);
            box-shadow: 0 4px 20px rgba(243,156,18,0.25);
        }
        .lock-title { font-size: 24px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
        .lock-desc { font-size: 15px; color: var(--gray-500); line-height: 1.8; margin-bottom: 28px; }
        .lock-btns { display: flex; gap: 16px; justify-content: center; }
        .btn-login-cta {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 12px 36px; border: none; border-radius: 8px;
            background: var(--primary); color: #fff;
            font-size: 15px; font-weight: 700; cursor: pointer;
            transition: all 0.3s; letter-spacing: 1px;
            box-shadow: 0 4px 14px rgba(26,60,122,0.3);
        }
        .btn-login-cta:hover {
            background: var(--primary-dark); transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(26,60,122,0.4);
        }
        .btn-register-cta {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 12px 36px; border: 2px solid var(--primary);
            border-radius: 8px; background: transparent; color: var(--primary);
            font-size: 15px; font-weight: 700; cursor: pointer;
            transition: all 0.3s; letter-spacing: 1px;
        }
        .btn-register-cta:hover {
            background: var(--primary); color: #fff; transform: translateY(-2px);
        }
        .btn-logout-inline {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 8px 24px; border: 2px solid #e74c3c;
            border-radius: 30px; background: #e74c3c; color: #fff;
            font-size: 14px; font-weight: 700; cursor: pointer;
            transition: all 0.3s; letter-spacing: 1px;
            box-shadow: 0 4px 14px rgba(231,76,60,0.35);
        }
        .btn-logout-inline:hover {
            background: #c0392b; border-color: #c0392b;
            transform: translateY(-1px);
        }

        /* ===== Member Info Bar (logged in) ===== */
        .member-info-bar {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 24px; margin-bottom: 30px;
            background: linear-gradient(135deg, rgba(26,60,122,0.08), rgba(26,60,122,0.03));
            border: 1px solid rgba(26,60,122,0.15); border-radius: 10px;
            box-shadow: 0 2px 8px rgba(26,60,122,0.06);
        }
        .member-info-left { display: flex; align-items: center; gap: 14px; }
        .member-avatar {
            width: 40px; height: 40px; border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--primary-dark));
            color: #fff; display: flex; align-items: center; justify-content: center;
            font-size: 18px; font-weight: 700;
            box-shadow: 0 2px 8px rgba(26,60,122,0.2);
        }
        .member-name { font-size: 15px; font-weight: 600; color: var(--gray-700); }
        .member-badge {
            display: inline-block; padding: 2px 10px;
            background: var(--gold); color: #fff;
            border-radius: 12px; font-size: 11px; font-weight: 600;
            letter-spacing: 1px; margin-left: 8px;
        }
        .btn-member-logout {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 8px 20px; border: 2px solid #e74c3c;
            border-radius: 30px; background: #e74c3c; color: #fff;
            font-size: 14px; font-weight: 700; cursor: pointer;
            transition: all 0.3s; letter-spacing: 1px;
            box-shadow: 0 4px 14px rgba(231,76,60,0.35);
        }
        .btn-member-logout:hover {
            background: #c0392b; border-color: #c0392b;
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(231,76,60,0.45);
        }
        .btn-member-logout:active { transform: scale(0.97); }
        .btn-member-logout svg { width: 16px; height: 16px; }

        /* ===== Download List Section ===== */
        .download-list-section { margin-bottom: 40px; }
        .download-list-head {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
        }
        .download-list-head h2 {
            font-size: 22px; font-weight: 800; color: var(--dark);
            letter-spacing: 2px; display: flex; align-items: center; gap: 10px;
        }
        .download-list-head h2::before {
            content: ''; display: inline-block; width: 4px; height: 20px;
            background: var(--primary); border-radius: 2px;
        }
        .download-search input {
            width: 260px; padding: 8px 16px; border: 1px solid var(--gray-300);
            border-radius: 20px; font-size: 14px; outline: none;
            transition: border-color 0.3s;
        }
        .download-search input:focus { border-color: var(--primary); }
        .download-total-bar {
            font-size: 13px; color: var(--gray-500); margin-bottom: 20px;
            padding-left: 14px;
        }
        .download-total-bar strong { color: var(--primary); font-size: 15px; }

        /* ===== Download Card ===== */
        .download-card-list { display: flex; flex-direction: column; gap: 12px; }
        .dl-card {
            display: flex; align-items: center; gap: 16px;
            background: #fff; border: 1px solid var(--gray-200);
            border-radius: 12px; padding: 18px 24px;
            transition: all 0.3s; position: relative; overflow: hidden;
        }
        .dl-card::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0;
            height: 3px; background: linear-gradient(90deg, var(--primary), var(--gold));
            transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
        }
        .dl-card:hover {
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            border-color: var(--primary-light); transform: translateY(-2px);
        }
        .dl-card:hover::before { transform: scaleX(1); }
        .dl-card-icon {
            font-size: 32px; width: 48px; height: 48px;
            display: flex; align-items: center; justify-content: center;
            background: var(--gray-100); border-radius: 10px; flex-shrink: 0;
        }
        .dl-card-body { flex: 1; min-width: 0; }
        .dl-card-title {
            font-size: 15px; font-weight: 600; color: var(--dark);
            margin-bottom: 8px; line-height: 1.4;
        }
        .dl-card-meta {
            display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
        }
        .dl-tag {
            display: inline-block; padding: 2px 8px; border-radius: 4px;
            font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
        }
        .dl-tag-pdf { background: #fee; color: #c0392b; }
        .dl-tag-doc, .dl-tag-docx { background: #e3f2fd; color: #1565c0; }
        .dl-tag-xls, .dl-tag-xlsx { background: #e8f5e9; color: #2e7d32; }
        .dl-tag-ppt, .dl-tag-pptx { background: #fff3e0; color: #e65100; }
        .dl-tag-zip, .dl-tag-rar { background: #fff8e1; color: #f57f17; }
        .dl-tag-jpg, .dl-tag-png, .dl-tag-gif { background: #f3e5f5; color: #7b1fa2; }
        .dl-tag-mp4, .dl-tag-avi { background: #e0f7fa; color: #00838f; }
        .dl-tag-txt { background: #f5f5f5; color: #616161; }
        .dl-meta-item {
            font-size: 12px; color: var(--gray-500);
        }
        .dl-download-count { font-weight: 500; }
        .dl-card-action { flex-shrink: 0; }
        .btn-dl {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 8px 22px; border: none; border-radius: 8px;
            background: var(--primary); color: #fff;
            font-size: 14px; font-weight: 600; cursor: pointer;
            text-decoration: none; line-height: 1;
            transition: all 0.3s; letter-spacing: 1px;
        }
        .btn-dl:hover {
            background: var(--primary-dark); transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(26,60,122,0.3);
        }
        .btn-dl:active { transform: scale(0.96); }
        .btn-dl svg { width: 16px; height: 16px; }
        .dl-no-file { font-size: 13px; color: var(--gray-400); }

        .download-empty {
            text-align: center; padding: 60px 20px; color: var(--gray-400);
        }
        .download-empty .empty-icon { font-size: 48px; margin-bottom: 16px; }
        .download-empty p { font-size: 15px; }

        /* ===== Modal ===== */
        .modal-overlay {
            display: none; position: fixed; inset: 0;
            background: rgba(0,0,0,0.6); z-index: 1000;
            align-items: center; justify-content: center;
            backdrop-filter: blur(4px);
        }
        .modal-overlay.show { display: flex; }
        .modal-box {
            background: #fff; border-radius: 16px; width: 420px; max-width: 92vw;
            max-height: 90vh; overflow-y: auto;
            box-shadow: 0 12px 48px rgba(0,0,0,0.2);
            animation: modalIn 0.35s ease;
        }
        @keyframes modalIn {
            from { opacity: 0; transform: scale(0.92) translateY(20px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }
        .modal-box.register-mode { width: 480px; }
        .modal-box.forgot-mode { width: 420px; }

        .modal-header {
            padding: 24px 28px 0; text-align: center;
        }
        .modal-header h3 {
            font-size: 22px; font-weight: 800; color: var(--dark);
            letter-spacing: 2px;
        }
        .modal-close {
            position: absolute; top: 16px; right: 20px;
            background: none; border: none; font-size: 24px;
            cursor: pointer; color: var(--gray-400); transition: color 0.2s;
        }
        .modal-close:hover { color: var(--gray-700); }
        .modal-box { position: relative; }
        .modal-body { padding: 24px 28px; }

        .form-group { margin-bottom: 16px; }
        .form-group label {
            display: block; margin-bottom: 6px; font-size: 14px;
            font-weight: 600; color: var(--gray-700);
        }
        .form-group label .required { color: #e74c3c; }
        .form-group input {
            width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300);
            border-radius: 8px; font-size: 14px; font-family: inherit;
            transition: border-color 0.3s, box-shadow 0.3s;
        }
        .form-group input:focus {
            outline: none; border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(26,60,122,0.1);
        }

        .btn-submit {
            width: 100%; padding: 12px; border: none; border-radius: 8px;
            background: var(--primary); color: #fff;
            font-size: 16px; font-weight: 700; cursor: pointer;
            transition: all 0.3s; letter-spacing: 2px;
        }
        .btn-submit:hover { background: var(--primary-dark); }
        .btn-submit:active { transform: scale(0.98); }

        .login-fields, .register-fields, .forgot-fields { display: none; }
        .login-fields { display: block; }

        .forgot-hint {
            margin-top: 16px; padding: 12px 16px;
            background: #fff8e1; border: 1px solid #ffe082;
            border-radius: 8px; font-size: 13px; color: #795548;
            line-height: 1.6; text-align: center;
        }

        .modal-footer-text {
            text-align: center; padding: 0 28px 24px; font-size: 14px; color: var(--gray-500);
        }
        .modal-footer-text a {
            color: var(--primary); cursor: pointer; font-weight: 600;
            transition: color 0.2s;
        }
        .modal-footer-text a:hover { color: var(--primary-dark); text-decoration: underline; }
        .footer-sep { color: var(--gray-300); margin: 0 8px; }

        /* ===== Info Modal ===== */
        .modal-icon-wrap { text-align: center; margin-bottom: 16px; }
        .modal-icon-wrap .icon-success { font-size: 48px; color: #2e7d32; }
        .modal-icon-wrap .icon-warning { font-size: 48px; color: var(--gold); }

        /* ===== Toast ===== */
        .toast {
            position: fixed; top: 30px; left: 50%; transform: translateX(-50%) translateY(-100px);
            padding: 12px 28px; border-radius: 30px; font-size: 14px; font-weight: 600;
            z-index: 3000; opacity: 0; transition: all 0.35s; white-space: nowrap;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        }
        .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
        .toast.success { background: #2e7d32; color: #fff; }
        .toast.warning { background: var(--gold); color: #fff; }

        /* ===== Responsive ===== */
        @media (max-width: 768px) {
            .main-container { padding: 30px 16px; }
            .page-header h1 { font-size: 24px; }
            .download-wrap { max-width: 100%; }
            .download-list-head { flex-direction: column; align-items: flex-start; }
            .download-search input { width: 100%; }
            .dl-card {
                flex-direction: column; align-items: flex-start; gap: 12px;
                padding: 16px;
            }
            .dl-card-action { width: 100%; }
            .btn-dl { width: 100%; justify-content: center; }
            .member-info-bar { flex-direction: column; gap: 12px; text-align: center; }
            .lock-btns { flex-direction: column; }
            .modal-box { width: 94vw; }
        }
