/* ========================================
   动画
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ========================================
   响应式布局 - 断点 1024px（平板横屏/小屏桌面）
   ======================================== */
@media (max-width: 1024px) {
    .main-content {
        padding: 76px 24px 32px;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
        left: auto;
    }

    .stats-bar {
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 28px;
    }

    .drag-file-panel,
    .upload-progress-panel {
        width: 360px;
        max-height: 420px;
    }
}

/* ========================================
   响应式布局 - 断点 768px（平板竖屏/大屏手机）
   ======================================== */
@media (max-width: 768px) {
    .main-content {
        padding: 68px 16px 24px;
        overflow-x: hidden;
    }

    .page-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header p {
        font-size: 13px;
    }

    .grid-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .grid-card {
        padding: 18px;
        min-width: 0;
        overflow: hidden;
    }

    .grid-card h2 {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .card-upload,
    .card-text {
        border-left-width: 2px;
    }

    .code-modal {
        width: 95vw;
        max-width: none;
        max-height: 90vh;
    }

    .code-modal-body code {
        font-size: 12px;
    }

    .cyber-modal {
        width: calc(100vw - 32px);
        max-width: 400px;
    }

    .drag-file-panel,
    .upload-progress-panel {
        width: calc(100vw - 32px);
        max-width: 380px;
        right: 16px;
        bottom: 16px;
    }

    .stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-label {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .stat-value {
        font-size: 22px;
    }

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

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

    .success-actions {
        flex-direction: column;
        gap: 10px;
        padding: 0 20px;
    }

    .btn-view-files,
    .btn-continue-upload {
        width: 100%;
    }

    input[type="file"] {
        font-size: 16px;
    }
}

/* ========================================
   响应式布局 - 断点 640px（中等手机）
   ======================================== */
@media (max-width: 640px) {
    .main-content {
        padding: 62px 12px 20px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .stat-card {
        padding: 12px 10px;
        text-align: center;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 20px;
    }

    .grid-card {
        padding: 14px;
    }

    .log-table {
        font-size: 12px;
    }

    .log-table th,
    .log-table td {
        padding: 10px 12px;
    }

    .item {
        padding: 12px 14px;
    }

    .item-name {
        font-size: 13px;
    }

    .item-meta {
        font-size: 12px;
    }

    .drag-file-panel,
    .upload-progress-panel {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 12px;
        max-height: 400px;
    }

    .toast {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 16px;
        width: auto;
    }
}

/* ========================================
   响应式布局 - 断点 480px（小屏手机）
   ======================================== */
@media (max-width: 480px) {
    .main-content {
        padding: 58px 12px 16px;
    }

    .page-header {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .page-header h1 {
        font-size: 19px;
    }

    .page-header p {
        font-size: 12px;
        color: var(--text-secondary);
    }

    .stats-bar {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .stat-card {
        padding: 10px 8px;
        text-align: center;
    }

    .stat-label {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .stat-value {
        font-size: 18px;
    }

    .grid-card {
        padding: 12px;
        border-radius: var(--radius-md);
    }

    .grid-card h2 {
        font-size: 13px;
        gap: 6px;
        margin-bottom: 14px;
    }

    .grid-card h2 svg {
        width: 16px;
        height: 16px;
    }

    .card-upload,
    .card-text {
        border-left-width: 2px;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        top: 10px;
        right: 10px;
    }

    .theme-toggle svg {
        width: 15px;
        height: 15px;
    }

    input[type="file"],
    input[type="text"],
    input[type="password"],
    select,
    textarea {
        padding: 10px 12px;
        font-size: 16px;
    }

    select {
        padding-right: 36px;
    }

    textarea {
        min-height: 90px;
        padding: 12px 14px;
    }

    .btn {
        width: 100%;
        font-size: 14px;
        padding: 12px 16px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .item {
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
    }

    .item-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .item-actions .btn-small {
        flex: 1;
        min-width: 56px;
        text-align: center;
        justify-content: center;
    }

    .item-name {
        font-size: 13px;
        gap: 6px;
    }

    .item-meta {
        font-size: 12px;
        gap: 6px;
    }

    .log-table {
        font-size: 11px;
    }

    .log-table th,
    .log-table td {
        padding: 8px 10px;
    }

    .log-table th {
        font-size: 10px;
    }

    .log-filename {
        max-width: 80px;
    }

    .log-container {
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .list {
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .drag-file-panel,
    .upload-progress-panel {
        width: 100vw;
        right: 0;
        bottom: 0;
        left: 0;
        max-height: 60vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .drag-file-header,
    .progress-panel-header {
        padding: 12px 14px;
    }

    .drag-file-footer {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .drag-file-actions {
        flex-direction: column;
    }

    .drag-file-actions .btn-cancel-upload,
    .drag-file-actions .btn-start-upload {
        width: 100%;
        text-align: center;
    }

    .code-modal {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .code-modal-header {
        padding: 12px 14px;
    }

    .code-modal-body pre {
        padding: 14px;
    }

    .code-modal-body code {
        font-size: 12px;
    }

    .message {
        padding: 10px 14px;
        font-size: 13px;
    }

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

    .success-message {
        font-size: 13px;
        padding: 0 12px;
    }

    .cyber-modal-header,
    .cyber-modal-body,
    .cyber-modal-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .cyber-modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .cyber-btn {
        width: 100%;
        text-align: center;
    }

    .empty {
        padding: 28px 14px;
        font-size: 13px;
    }

    .text-preview {
        padding: 10px;
    }

    .text-preview pre {
        font-size: 12px;
    }
}
