/* ===== Wolfborn Global Theme ===== */

/* 1) Base layout + concrete background */

:root {
    --wb-bg-dark: #050608;
    --wb-bg-panel: #10121b;
    --wb-bg-panel-alt: #111827;
    --wb-steel-blue: #1f2937;
    --wb-steel-blue-light: #253043;
    --wb-border-soft: #374151;
    --wb-text-main: #e5e7eb;
    --wb-text-muted: #9ca3af;
    --wb-neon-orange: #f59e0b;
    --wb-neon-orange-soft: #f97316;
    --wb-accent-blue: #1d4ed8;
    --wb-avatar-ring: #22d3ee;
    --wb-radius-lg: 0.9rem;
    --wb-radius-xl: 1.3rem;
    --wb-shadow-soft: 0 20px 30px rgba(0,0,0,0.6);
    --wb-shadow-small: 0 10px 18px rgba(0,0,0,0.5);
    --wb-transition-fast: 150ms ease-out;
    --wb-transition-slow: 220ms ease-out;
    --wb-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--wb-font-sans);
    color: var(--wb-text-main);
    background-color: var(--wb-bg-dark);

    /* Aged concrete + soot + vignette */
    background-image:
        radial-gradient(circle at 0 0,
            rgba(255,255,255,0.05),
            transparent 55%),
        radial-gradient(circle at 100% 0,
            rgba(255,255,255,0.04),
            transparent 60%),
        radial-gradient(circle at 50% 100%,
            rgba(0,0,0,0.7),
            transparent 55%),
        linear-gradient(135deg,
            #18181b 0%,
            #020617 45%,
            #111827 70%,
            #020617 100%);
    background-attachment: fixed;
}

/* Subtle noise / texture overlay on everything */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    mix-blend-mode: soft-light;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    z-index: -1;
}

/* 2) Header / nav bar */

header {
    background: radial-gradient(circle at 0 0, #111827 0, #020617 45%)
                ,linear-gradient(to right, #020617, #020617 40%, #020617);
    border-bottom: 1px solid rgba(55,65,81,0.7);
    padding: 0.85rem 2.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 18px 30px rgba(0,0,0,0.7);
}

header h1 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wb-neon-orange-soft);
    text-shadow: 0 0 8px rgba(245,158,11,0.9);
}

nav a {
    color: var(--wb-text-muted);
    text-decoration: none;
    margin-left: 0.8rem;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: color var(--wb-transition-fast), border-color var(--wb-transition-fast);
}

nav a:hover {
    color: var(--wb-neon-orange-soft);
    border-color: var(--wb-neon-orange-soft);
}

/* Logged-in badge */

.logged-in-pill {
    background: radial-gradient(circle at 0 0, #22d3ee 0, #1d4ed8 60%);
    color: #e5e7eb;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 16px rgba(34,211,238,0.6);
}

/* 3) Main layout + “metal tile” cards */

main {
    padding: 2.5rem 2rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background-image:
        linear-gradient(135deg, rgba(15,23,42,0.98), rgba(15,23,42,0.92)),
        radial-gradient(circle at 0 0, rgba(55,65,81,0.9), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(15,23,42,0.9), transparent 50%);
    border-radius: var(--wb-radius-xl);
    border: 1px solid rgba(75,85,99,0.7);
    padding: 1.8rem 2rem;
    box-shadow: var(--wb-shadow-soft);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background-image: linear-gradient(135deg,
        rgba(148,163,184,0.16) 0%,
        transparent 35%,
        transparent 65%,
        rgba(15,23,42,0.8) 100%);
    opacity: 0.55;
}

/* Card headings */

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.card h2 {
    font-size: 1.1rem;
    color: #e5e7eb;
}

.card h3 {
    font-size: 1rem;
    color: var(--wb-neon-orange-soft);
}

/* Text + lists */

p {
    margin-top: 0.4rem;
    margin-bottom: 0.7rem;
    color: var(--wb-text-muted);
    font-size: 0.95rem;
}

ul {
    margin-top: 0.3rem;
    padding-left: 1.2rem;
    color: var(--wb-text-muted);
}

/* 4) Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid var(--wb-border-soft);
    background: radial-gradient(circle at 0 0, #020617 0, #020617 70%);
    color: var(--wb-text-main);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform var(--wb-transition-fast), box-shadow var(--wb-transition-fast), background var(--wb-transition-fast), border-color var(--wb-transition-fast);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--wb-shadow-small);
    border-color: var(--wb-accent-blue);
}

.btn-primary {
    background: radial-gradient(circle at 0 0, var(--wb-neon-orange) 0, #7c2d12 60%);
    border-color: rgba(248,250,252,0.05);
    color: #111827;
    text-shadow: 0 0 4px rgba(0,0,0,0.7);
}

.btn-primary:hover {
    background: radial-gradient(circle at 0 0, var(--wb-neon-orange-soft) 0, #9a3412 65%);
}

/* 5) Forms */

label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wb-text-muted);
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    max-width: 360px;
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #4b5563;
    background: radial-gradient(circle at 0 0, #020617 0, #020617 70%);
    color: var(--wb-text-main);
    font-size: 0.9rem;
}

input[type="file"] {
    padding: 0.35rem;
}

/* 6) Workspace grid & user tiles */

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.user-tile {
    cursor: pointer;
    border-radius: var(--wb-radius-xl);
    border: 1px solid rgba(31,41,55,0.9);
    padding: 1.4rem 1.6rem 1.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--wb-shadow-soft);
    background-image:
        linear-gradient(135deg, rgba(15,23,42,0.96), rgba(15,23,42,0.9)),
        linear-gradient(to right, rgba(55,65,81,0.3), transparent 40%, rgba(15,23,42,0.7));
    transition: transform var(--wb-transition-slow), box-shadow var(--wb-transition-slow), border-color var(--wb-transition-fast), background-position 320ms ease-out;
    background-size: 160% 160%;
    background-position: 0% 50%;
}

.user-tile:hover {
    transform: translateY(-4px);
    border-color: var(--wb-neon-orange-soft);
    box-shadow: 0 30px 45px rgba(0,0,0,0.85);
    background-position: 100% 50%;
}

/* Avatar circle */

.avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 9999px;
    background: radial-gradient(circle at 0 0, #22d3ee 0, #1d4ed8 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow:
        0 0 0 3px rgba(15,23,42,1),
        0 0 0 5px rgba(34,211,238,0.6),
        0 0 25px rgba(34,211,238,0.9);
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tile name & badge */

.user-tile-name {
    margin-top: 0.9rem;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.user-tile-badge {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--wb-text-muted);
    padding: 0.25rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(75,85,99,0.8);
    background: radial-gradient(circle at 0 0, #020617 0, #020617 70%);
}

/* 7) Minor details */

a {
    color: var(--wb-neon-orange-soft);
}

a:hover {
    text-decoration: underline;
}

.error-text {
    color: #f87171;
}

.success-text {
    color: #34d399;
}

.upload-dropzone {
    border: 1px dashed rgba(148,163,184,0.4);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: rgba(15,23,42,0.6);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.upload-dropzone__icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    color: #cbd5e1;
}

.upload-dropzone__title {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.upload-dropzone__subtitle {
    margin: 0.25rem 0 0;
    color: var(--wb-text-muted);
    font-size: 0.9rem;
}

.upload-dropzone.is-active {
    border-color: rgba(59,130,246,0.8);
    box-shadow: 0 0 15px rgba(59,130,246,0.25);
    background: rgba(37,99,235,0.15);
}

.upload-dropzone.is-uploading {
    opacity: 0.6;
    pointer-events: none;
}

/* Profile settings collapsible */

.profile-settings {
    margin-left: auto;
    flex: 1;
    min-width: 260px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profile-settings-toggle {
    width: 100%;
    justify-content: space-between;
    background: radial-gradient(circle at 0 0, #111827 0, #0b1221 60%);
    border: 1px solid rgba(75,85,99,0.8);
    color: var(--wb-text-main);
    border-radius: 0.6rem;
    box-shadow: var(--wb-shadow-small);
}

.profile-settings-panel {
    background: linear-gradient(135deg, rgba(17,24,39,0.96), rgba(15,23,42,0.92));
    border: 1px solid rgba(75,85,99,0.0);
    border-radius: 0.9rem;
    padding: 0 1.2rem;
    box-shadow: var(--wb-shadow-soft);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition:
        max-height 0.25s ease,
        opacity 0.25s ease,
        padding 0.25s ease,
        border-color 0.25s ease,
        visibility 0.25s ease;
}

.profile-settings-panel--open {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
    padding: 1.1rem 1.2rem;
    border-color: rgba(75,85,99,0.65);
}

.profile-settings-section {
    padding: 0.9rem;
    margin-bottom: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.75rem;
}

.profile-settings-section h4 {
    margin: 0 0 0.6rem;
    color: var(--wb-neon-orange-soft);
}

.file-input {
    margin-bottom: 0.75rem;
}

.btn-orange {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(90deg, #f18e01, #8f3500);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* 8) Sharing UI bits */

.item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(55,65,81,0.6);
    border-radius: 0.6rem;
    background: rgba(15,23,42,0.6);
}

.folder-list,
.file-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.item-row__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.item-row__actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.file-list .item-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.file-entry__top {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.file-entry__name {
    flex: 1 1 auto;
    min-width: 0;
    word-break: normal;
    overflow-wrap: anywhere;
}

.file-entry__actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.file-entry__actions form {
    margin: 0;
    display: inline-flex;
}

.file-entry__actions .btn,
.file-entry__actions a.btn {
    white-space: nowrap;
}

.file-preview-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(4px);
    z-index: 2000;
    padding: 1rem;
}

.file-preview-modal.is-visible {
    display: flex;
}

.file-preview-modal__body {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    max-width: min(90vw, 720px);
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.file-preview-modal__header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.file-preview-modal__content {
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-modal__content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pill-shared {
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.5);
    color: #bfdbfe;
}
