/* =========================================
   Aurora Workspace Theme
   ========================================= */

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

html, body {
    min-height: 100%;
}

:root {
    --page-gradient: linear-gradient(135deg, #eef2ff 0%, #f9fafb 45%, #ecfeff 100%);
    --surface-glass: rgba(255, 255, 255, 0.82);
    --surface-muted: rgba(255, 255, 255, 0.62);
    --surface-strong: rgba(248, 250, 252, 0.92);
    --surface-dark: rgba(15, 23, 42, 0.78);
    --surface-night: rgba(15, 23, 42, 0.56);
    --border-color: rgba(148, 163, 184, 0.35);
    --border-strong: rgba(148, 163, 184, 0.55);
    --primary: #6366f1;
    --primary-strong: #4f46e5;
    --primary-soft: rgba(99, 102, 241, 0.18);
    --accent: #22d3ee;
    --accent-soft: rgba(34, 211, 238, 0.16);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #38bdf8;
    --text-strong: #0f172a;
    --text: #1f2937;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-soft: 0 35px 80px -45px rgba(15, 23, 42, 0.6);
    --shadow-card: 0 22px 60px -48px rgba(15, 23, 42, 0.65);
    --shadow-intense: 0 35px 90px -40px rgba(79, 70, 229, 0.5);
    --blur-strong: 32px;
    --transition: all 0.28s ease;
    --transition-fast: all 0.18s ease;
    --spacing-xs: 6px;
    --spacing-sm: 12px;
    --spacing-md: 18px;
    --spacing-lg: 28px;
    --spacing-xl: 42px;
    --spacing-xxl: 64px;
    --font-family: 'Inter', 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    font-family: var(--font-family);
    background: var(--page-gradient);
    color: var(--text-strong);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 55%),
                radial-gradient(circle at bottom left, rgba(34, 211, 238, 0.22), transparent 50%);
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ================== Background ================== */
.background-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-gradient {
    position: absolute;
    inset: -10%;
    background: var(--page-gradient);
    filter: blur(0px);
}

.bg-orb {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.7;
}

.bg-orb.orb-one {
    top: -120px;
    left: -80px;
    background: rgba(99, 102, 241, 0.55);
}

.bg-orb.orb-two {
    bottom: -140px;
    right: -40px;
    background: rgba(34, 211, 238, 0.45);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.35;
}

/* ================== Buttons ================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--surface-muted);
    color: var(--text-strong);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 32px -28px rgba(15, 23, 42, 0.6);
}

.btn i {
    font-size: 0.95rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 35px -28px rgba(15, 23, 42, 0.6);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-intense);
}

.btn-primary:hover {
    box-shadow: 0 25px 45px -32px rgba(79, 70, 229, 0.65);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--primary-strong);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-strong);
}

.btn-outline:hover {
    border-color: rgba(99, 102, 241, 0.45);
    color: var(--primary-strong);
}

.btn-soft {
    background: var(--primary-soft);
    color: var(--primary-strong);
    border: 1px solid rgba(99, 102, 241, 0.28);
}

.btn-soft:hover {
    background: rgba(99, 102, 241, 0.25);
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-info {
    background: rgba(56, 189, 248, 0.14);
    color: var(--info);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-share {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-strong);
    border: 1px solid rgba(15, 23, 42, 0.4);
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.55);
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* ================== Forms ================== */
label {
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-strong);
    transition: var(--transition-fast);
    outline: none;
    backdrop-filter: blur(12px);
}

input::placeholder,
textarea::placeholder {
    color: rgba(100, 116, 139, 0.65);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

textarea {
    min-height: 220px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1 1 260px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ================== Login ================== */
.main-container {
    position: relative;
    z-index: 2;
    width: min(1200px, 90vw);
    margin: 0 auto;
    padding: 140px 0 120px;
    transition: var(--transition);
}

.main-container:not(.with-navbar) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 120px;
}

.main-container.with-navbar {
    padding-top: 180px;
}

.auth-section {
    width: 100%;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 56px;
    align-items: center;
    padding: 64px 68px;
    background: var(--surface-strong);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(var(--blur-strong));
}

.showcase-headline h1 {
    font-size: 2.6rem;
    line-height: 1.1;
    color: var(--text-strong);
    margin-bottom: 18px;
}

.showcase-headline p {
    color: var(--text-muted);
    max-width: 420px;
}

.showcase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: var(--primary-soft);
    color: var(--primary-strong);
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: 1px solid rgba(99, 102, 241, 0.25);
    text-transform: uppercase;
    font-size: 0.75rem;
}

.showcase-list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.showcase-list li {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 35px -28px rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(18px);
}

.showcase-list .icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(34, 211, 238, 0.18));
    color: var(--primary-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.showcase-list h3 {
    font-size: 1.1rem;
    color: var(--text-strong);
    margin-bottom: 4px;
}

.showcase-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-card {
    background: var(--surface-dark);
    border-radius: var(--radius-xl);
    padding: 48px 44px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
    box-shadow: 0 40px 80px -50px rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(22px);
}

.auth-card-header {
    margin-bottom: 32px;
}

.auth-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.28);
    color: #c7d2fe;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.auth-card h2 {
    font-size: 2rem;
    margin: 20px 0 12px;
}

.auth-card p {
    color: rgba(226, 232, 240, 0.78);
}

.auth-card .form-group label {
    color: rgba(226, 232, 240, 0.85);
}

.auth-card input,
.auth-card select,
.auth-card textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.auth-card input::placeholder,
.auth-card textarea::placeholder {
    color: rgba(226, 232, 240, 0.55);
}

.auth-buttons {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.auth-buttons .btn {
    flex: 1;
}

.auth-buttons .btn-secondary {
    background: rgba(248, 250, 252, 0.12);
    border: 1px solid rgba(248, 250, 252, 0.25);
    color: #f8fafc;
}

.auth-meta {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.9rem;
}

.auth-meta-item i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.24);
    color: #c7d2fe;
}

/* ================== Navbar ================== */
.navbar {
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 120;
}

.nav-container {
    width: min(1180px, 92vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 18px 28px;
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(var(--blur-strong));
    box-shadow: var(--shadow-card);
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-strong);
    font-weight: 700;
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 15px 40px -20px rgba(79, 70, 229, 0.8);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 1.15rem;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.nav-pill {
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--primary-strong);
    font-weight: 600;
    border: 1px solid rgba(34, 211, 238, 0.25);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-quick-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    color: var(--primary-strong);
    font-weight: 600;
}

.user-chip i {
    font-size: 1rem;
}

/* ================== Workspace Layout ================== */
.workspace {
    display: none;
}

.workspace-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: flex-start;
}

.sidebar {
    position: sticky;
    top: 140px;
    background: var(--surface-strong);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 28px 24px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(22px);
}

.sidebar-header {
    margin-bottom: 24px;
}

.sidebar-kicker {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-strong);
    margin-bottom: 8px;
}

.sidebar-header h2 {
    font-size: 1.35rem;
    color: var(--text-strong);
}

.sidebar-header p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid transparent;
    color: var(--text);
    font-weight: 600;
    transition: var(--transition-fast);
}

.nav-link i {
    font-size: 1rem;
    color: var(--text-soft);
}

.nav-link:hover {
    transform: translateX(6px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 12px 24px -22px rgba(99, 102, 241, 0.55);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(34, 211, 238, 0.16));
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--primary-strong);
    box-shadow: 0 18px 30px -28px rgba(99, 102, 241, 0.55);
}

.nav-link.active i {
    color: var(--primary-strong);
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.content-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.content-header h2 {
    font-size: 1.45rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-strong);
}

.content-header h2 i {
    color: var(--primary);
}

.content-header p {
    color: var(--text-muted);
}

.tab-content {
    display: none;
    animation: fadeIn 0.32s ease;
}

.tab-content.active {
    display: block;
}

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

.card {
    background: var(--surface-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(22px);
}

.card + .card {
    margin-top: 20px;
}

/* ================== Upload ================== */
.upload-zone {
    position: relative;
    border: 1.8px dashed rgba(99, 102, 241, 0.45);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.6);
    padding: 54px 32px;
    text-align: center;
    transition: var(--transition);
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(34, 211, 238, 0.15));
    opacity: 0;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.68);
    box-shadow: 0 25px 60px -32px rgba(79, 70, 229, 0.45);
}

.upload-zone:hover::before,
.upload-zone.dragover::before {
    opacity: 1;
}

.upload-icon {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.23), rgba(34, 211, 238, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-strong);
}

.upload-zone h3 {
    font-size: 1.2rem;
    color: var(--text-strong);
    margin-bottom: 8px;
}

.upload-zone p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.upload-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.progress-container {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-bar {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    inset: 0;
    width: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: inherit;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ================== Files ================== */
.files-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.file-item {
    background: var(--surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.file-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 55px -32px rgba(15, 23, 42, 0.55);
}

.file-thumbnail {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.28);
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-fast);
}

.image-thumbnail-container:hover img {
    transform: scale(1.04);
}

.image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    color: #fff;
    font-size: 1.4rem;
    transition: var(--transition-fast);
}

.image-thumbnail-container:hover .image-overlay {
    opacity: 1;
}

.video-thumbnail,
.audio-thumbnail,
.pdf-thumbnail,
.default-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--primary-strong);
}

.video-thumbnail {
    background: rgba(79, 70, 229, 0.12);
    width: 100%;
    height: 160px;
    position: relative;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.video-play-icon {
    font-size: 2.4rem;
}

.audio-thumbnail {
    font-size: 2rem;
    background: rgba(99, 102, 241, 0.08);
    width: 100%;
    height: 120px;
}

.default-thumbnail {
    font-size: 2.2rem;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-name {
    font-weight: 600;
    color: var(--text-strong);
    word-break: break-all;
}

.file-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-actions button {
    flex: 1;
    min-width: 110px;
}

/* ================== Clipboard ================== */
.clipboard-editor {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.25);
    cursor: pointer;
    transition: var(--transition-fast);
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-label .checkmark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.checkbox-label .checkmark::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: inherit;
}

.checkbox-label input:checked + .checkmark {
    border-color: var(--primary-strong);
    background: var(--primary-strong);
}

.checkbox-label input:checked + .checkmark::after {
    background: #fff;
}

.checkbox-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -28px rgba(99, 102, 241, 0.55);
}

/* ================== History ================== */
.history-controls {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.search-section,
.filter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.search-section {
    justify-content: space-between;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.75);
    overflow: hidden;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.search-box i {
    margin-right: 16px;
    color: var(--text-muted);
}

.search-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-strong);
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-btn:hover {
    color: var(--primary);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filters select,
.filters input {
    min-width: 160px;
}

.bulk-actions {
    display: flex;
    gap: 12px;
}

.history-container {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 22px;
}

.history-item {
    background: var(--surface-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 22px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-fast);
}

.history-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -30px rgba(79, 70, 229, 0.45);
}

.history-item.pinned {
    border-color: rgba(252, 211, 77, 0.6);
    box-shadow: 0 24px 40px -28px rgba(252, 211, 77, 0.4);
}

.history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.history-type {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-strong);
}

.history-badges {
    display: flex;
    gap: 8px;
}

.badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.badge-pin {
    background: rgba(251, 191, 36, 0.2);
    color: #b45309;
}

.badge-favorite {
    background: rgba(236, 72, 153, 0.18);
    color: #db2777;
}

.history-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-strong);
}

.history-preview {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.code-preview,
.json-preview,
.html-preview {
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    color: var(--primary-strong);
    font-size: 0.75rem;
    font-weight: 600;
}

.history-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.history-actions {
    flex-wrap: wrap;
}

.history-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-actions,
.prompt-actions,
.command-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-action,
.command-action {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.prompt-action:hover,
.command-action:hover {
    color: var(--primary-strong);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.prompt-action.favorite,
.command-action.favorite {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.12);
}

.prompt-action.prompt-delete,
.command-action.prompt-delete {
    color: var(--danger);
}

/* ================== Prompts ================== */
.prompt-toolbar,
.command-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.toolbar-left,
.toolbar-right,
.toolbar-center {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prompts-container,
.commands-container {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
}

.prompt-card,
.command-card {
    background: var(--surface-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-fast);
}

.prompt-card.favorite,
.command-card.favorite {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 28px 55px -34px rgba(245, 158, 11, 0.4);
}

.prompt-card:hover,
.command-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 56px -34px rgba(79, 70, 229, 0.45);
}

.prompt-header,
.command-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.prompt-title,
.command-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-strong);
}

.prompt-description,
.command-description {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.prompt-content,
.command-content {
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.prompt-tags,
.command-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-tag,
.command-tag {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.16);
    color: var(--primary-strong);
    font-size: 0.75rem;
    font-weight: 600;
}

.prompt-meta,
.command-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.command-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    color: var(--primary-strong);
    font-size: 0.8rem;
    font-weight: 600;
}

.command-badge.platform {
    background: rgba(14, 165, 233, 0.14);
    color: #0ea5e9;
}

.command-badge.shell {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

.command-badge.usage {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.platform-icon,
.shell-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 6px;
    background: currentColor;
    opacity: 0.75;
}

.platform-icon.linux { color: #16a34a; }
.platform-icon.macos { color: #0ea5e9; }
.platform-icon.windows { color: #2563eb; }
.platform-icon.universal { color: #f97316; }

.shell-icon.bash { color: #0ea5e9; }
.shell-icon.zsh { color: #8b5cf6; }
.shell-icon.powershell { color: #38bdf8; }
.shell-icon.cmd { color: #f97316; }
.shell-icon.universal { color: #64748b; }

/* ================== Text Editor ================== */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.editor-toolbar .toolbar-actions {
    display: flex;
    gap: 10px;
}

.editor-status {
    display: flex;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.editor-status span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ================== Pickers & Lists ================== */
.file-list {
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.6);
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    transition: var(--transition-fast);
}

.file-list-item:hover {
    background: rgba(99, 102, 241, 0.12);
}

/* ================== Empty States ================== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.45);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--text-strong);
    margin-bottom: 8px;
}

/* ================== Mobile Tabbar ================== */
.mobile-tabbar {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, 92vw);
    background: var(--surface-strong);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    box-shadow: 0 25px 80px -40px rgba(15, 23, 42, 0.7);
    justify-content: space-around;
    align-items: center;
    padding: 8px 16px;
    backdrop-filter: blur(22px);
    z-index: 150;
}

.tabbar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 8px;
    min-width: 48px;
}

.tabbar-link i {
    font-size: 1.1rem;
}

.tabbar-link.active {
    color: var(--primary-strong);
}

.tabbar-center-btn {
    position: relative;
    top: -12px;
}

.tabbar-center-btn button {
    width: 48px;
    height: 48px;
    background: var(--primary-strong);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tabbar-center-btn button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

body.has-tabbar {
    padding-bottom: 96px;
}

@media (max-width: 768px) {
    .mobile-tabbar {
        width: min(380px, 94vw);
        padding: 6px 12px;
    }

    .tabbar-link {
        min-width: 40px;
        padding: 4px 6px;
        font-size: 0.6rem;
    }

    .tabbar-link i {
        font-size: 1rem;
    }

    .tabbar-center-btn button {
        width: 44px;
        height: 44px;
    }
}

/* ================== Notification & Loading ================== */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-md);
    background: var(--surface-dark);
    color: #f8fafc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 25px 55px -35px rgba(15, 23, 42, 0.9);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: var(--transition);
    z-index: 300;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success { border-color: rgba(16, 185, 129, 0.4); }
.notification.error { border-color: rgba(239, 68, 68, 0.4); }
.notification.warning { border-color: rgba(245, 158, 11, 0.4); }
.notification.info { border-color: rgba(56, 189, 248, 0.4); }

#loading {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 250;
}

.spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================== Modals ================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 260;
    backdrop-filter: blur(12px);
}

.modal-content {
    width: min(640px, 92vw);
    background: var(--surface-glass);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.modal-header h3 {
    font-size: 1.4rem;
    color: var(--text-strong);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--primary-strong);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--text);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ================== Mobile Block ================== */
.mobile-block {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 4000;
}

.mobile-block-card {
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.3);
    backdrop-filter: blur(18px);
    max-width: 540px;
    text-align: center;
    box-shadow: 0 35px 80px -40px rgba(0, 0, 0, 0.6);
}

.mobile-block-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.mobile-block-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================== Tables & Toggles ================== */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    inset: 0;
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    transition: var(--transition-fast);
}

.toggle-switch .slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: 0 8px 15px -8px rgba(15, 23, 42, 0.6);
}

.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(24px);
}

/* ================== Responsive ================== */
@media (max-width: 1200px) {
    .workspace-shell {
        grid-template-columns: 260px minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1fr;
        padding: 48px 42px;
    }

    .auth-card {
        order: 2;
    }

    .showcase-headline h1 {
        font-size: 2.2rem;
    }

    .workspace-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: flex;
        flex-direction: column;
    }

    .nav-quick-links {
        display: none;
    }
}

@media (max-width: 768px) {
    body::before {
        opacity: 0.65;
    }

    .navbar {
        top: 20px;
    }

    .nav-container {
        gap: 18px;
        padding: 16px 20px;
    }

    .brand-copy {
        display: none;
    }

    .nav-pill {
        display: none;
    }

    .main-container {
        padding: 120px 0 140px;
        width: min(720px, 94vw);
    }

    .auth-shell {
        padding: 36px 28px;
    }

    .showcase-list li {
        padding: 16px 18px;
    }

    .card,
    .file-item,
    .prompt-card,
    .command-card,
    .history-item {
        padding: 20px;
    }

    .files-container,
    .history-container,
    .prompts-container,
    .commands-container {
        grid-template-columns: 1fr;
    }

    .nav-user span {
        display: none;
    }

    .nav-user {
        gap: 8px;
    }

    .user-chip {
        padding: 0.35rem 0.7rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .auth-shell {
        padding: 28px 24px;
        gap: 32px;
    }

    .showcase-headline h1 {
        font-size: 1.9rem;
    }

    .auth-buttons {
        flex-direction: column;
    }

    .filter-section,
    .search-section {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-actions {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar-left,
    .toolbar-right,
    .toolbar-center {
        width: 100%;
        justify-content: space-between;
    }
}

/* ================== Utility ================== */
.fade-enter {
    animation: fadeIn 0.3s ease forwards;
}
