/* ═══════════════════════════════════════════════════
   FBX Texture Packer — Dark Glassmorphism Theme
   ═══════════════════════════════════════════════════ */

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

:root {
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --bg-panel-solid: #1e293b;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-dimmer: #64748b;
    --accent-blue: #3b82f6;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
}

html,
body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
}

/* ── Header ── */
#app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 24px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

#app-header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid var(--border-hover);
}

.back-link:hover {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--accent-blue);
    transform: translateX(-2px);
}

#app-header h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

#app-header .company-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dimmer);
    letter-spacing: 0;
}

.bmac-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #FF813F;
    border: 1px solid #FF813F;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.bmac-button:hover {
    transform: translateY(-1px);
    background: #FF813F;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 129, 63, 0.35);
}

.bmac-button:active {
    transform: translateY(0);
}

/* ── Main 3‑panel Layout ── */
#app-layout {
    display: grid;
    grid-template-columns: 280px 1fr 290px;
    height: calc(100vh - 53px);
}

/* ── Glass Panel Base ── */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-title {
    font-size: 17px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.clear-button {
    background: transparent;
    border: none;
    color: var(--text-dimmer);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.clear-button:hover {
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

.clear-button:active {
    transform: scale(0.95);
}

.panel-title.accent {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
}

/* ── Sidebar (Assets) ── */
#sidebar {
    border-right: 1px solid var(--border);
}

.asset-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.asset-list::-webkit-scrollbar {
    width: 4px;
}

.asset-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.empty-message {
    text-align: center;
    font-size: 13px;
    color: var(--text-dimmer);
    margin-top: 60px;
}

/* Asset Item */
.asset-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    background: rgba(255, 255, 255, 0.02);
}

.asset-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.asset-item.selected {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.08);
}

.asset-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    cursor: pointer;
    flex-shrink: 0;
}

.asset-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-remove {
    background: none;
    border: none;
    color: var(--text-dimmer);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    line-height: 1;
    transition: color 0.15s;
}

.asset-remove:hover {
    color: var(--accent-red);
}

.asset-edit {
    background: none;
    border: none;
    color: var(--text-dimmer);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    line-height: 1;
    transition: color 0.15s;
    margin-right: 2px;
}

.asset-edit:hover {
    color: #eab308;
    /* Yellow */
}

.asset-name-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    color: var(--text);
    font-size: 12px;
    padding: 2px 6px;
    width: 100%;
    outline: none;
    font-family: inherit;
    margin-bottom: 2px;
}

.asset-textures {
    display: flex;
    gap: 3px;
    margin-top: 4px;
}

.tex-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dimmer);
}

.tex-badge.active-bc {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.tex-badge.active-n {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.tex-badge.active-m {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

/* Upload Zone */
.upload-zone {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.upload-label:hover,
.upload-zone.drag-over .upload-label {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.upload-text {
    font-size: 13px;
    font-weight: 600;
}

.upload-sub {
    font-size: 11px;
    color: var(--text-dimmer);
    margin-top: 4px;
}

/* Sidebar drag-over state */
#sidebar.drag-over {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--accent-blue);
}

/* ── Preview Section ── */
#preview-section {
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-panel-solid);
}

#canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#three-mount {
    position: absolute;
    inset: 0;
}

#three-mount canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.overlay-message {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
    z-index: 5;
    font-size: 15px;
    color: var(--text-dimmer);
    font-weight: 500;
}

.overlay-message span {
    font-size: 18px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.error-banner {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239, 68, 68, 0.85);
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.viewport-help {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    z-index: 4;
    animation: fadeIn 0.8s ease-out;
}

.help-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.help-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 18px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 9px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* ── Material Controls Overlay ── */
.material-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 15;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    min-width: 200px;
    pointer-events: auto;
}

.mat-ctrl-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.light-orient-gadget {
    position: absolute;
    top: -2px;
    left: -48px;
    /* Move perfectly outside to the left */
    width: 36px;
    /* Slightly larger for better visibility */
    height: 36px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.8);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.light-orient-gadget.visible {
    opacity: 1;
    transform: scale(1);
}

.light-orient-sun {
    width: 10px;
    height: 10px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700;
    z-index: 3;
}

.light-orient-arrow {
    position: absolute;
    width: 2px;
    height: 14px;
    background: linear-gradient(to top, #FFD700, transparent);
    top: 50%;
    left: 50%;
    transform-origin: bottom center;
    z-index: 2;
}

.preset-select {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 4px 6px;
    font-size: 11px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.preset-select:hover,
.preset-select:focus {
    border-color: var(--accent);
}

.preset-select option {
    background: #0f172a;
    color: white;
}

.finetune-hint {
    margin-top: 16px;
    font-size: 10px;
    color: var(--text-dimmer);
    text-align: center;
    opacity: 0.8;
    line-height: 1.4;
    font-style: italic;
}

.mat-ctrl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.mat-ctrl-row label {
    font-size: 11px;
    color: var(--text-dim);
    min-width: 80px;
    flex-shrink: 0;
}

.mat-ctrl-row input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.mat-ctrl-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s, box-shadow 0.2s;
}

.mat-ctrl-row input[type="range"]:focus::-webkit-slider-thumb {
    background: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.infinite-track {
    flex: 1;
    height: 24px;
    position: relative;
    cursor: ew-resize;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    padding: 0 7px;
    /* Matches half thumb width for perfect containment */
    box-sizing: border-box;
}

/* The visual 4px track line that matches other sliders */
.infinite-track:before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transition: background 0.2s;
}

.infinite-track:focus:before {
    background: rgba(255, 255, 255, 0.15);
}

.infinite-thumb {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    top: 12px;
    left: 0%;
    transform: translate(-50%, -50%);
    /* Center on current 'left' percentage */
    pointer-events: none;
    transition: background 0.2s, box-shadow 0.2s;
    z-index: 2;
}

.infinite-track:focus .infinite-thumb {
    background: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.mat-ctrl-row span {
    font-size: 10px;
    color: var(--text-dimmer);
    min-width: 26px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.mat-ctrl-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 12px 0 8px;
}

.color-picker-input {
    width: 28px;
    height: 18px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: none;
    cursor: pointer;
    overflow: hidden;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
}

/* ── Texture Panel ── */
.texture-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 20px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
}

.gradient-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
}

.texture-slots {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.texture-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.slot-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.slot-box {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-sm);
    border: 2px dashed rgba(255, 255, 255, 0.12);
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.slot-box.drag-over {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.slot-box.has-texture {
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.15);
}

.slot-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slot-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
    color: var(--text-dimmer);
    font-size: 10px;
    gap: 4px;
    transition: color 0.15s;
}

.slot-upload-label:hover {
    color: var(--accent-blue);
}

.slot-upload-label svg {
    width: 20px;
    height: 20px;
}

/* Hover overlay on texture with image */
.slot-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.slot-box:hover .slot-hover-overlay {
    opacity: 1;
}

.slot-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.slot-action-btn.replace {
    background: var(--accent-blue);
}

.slot-action-btn.replace:hover {
    background: #2563eb;
}

.slot-action-btn.download {
    background: var(--accent-green);
}

.slot-action-btn.download:hover {
    background: #16a34a;
}

.slot-action-btn.remove {
    background: var(--accent-red);
}

.slot-action-btn.remove:hover {
    background: #dc2626;
}

/* ── Settings Panel ── */
#settings-panel {
    border-left: 1px solid var(--border);
}

.settings-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.badge.warning {
    color: #f97316;
    /* Orange color */
    background: rgba(249, 115, 22, 0.15);
}

.badge.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.form-group input,
.form-group select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-blue);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-panel-solid);
}

.hint {
    font-size: 10px;
    color: var(--text-dimmer);
    line-height: 1.4;
}

/* ── Toggle Switch ── */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch {
    display: inline-block;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 18px;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}

/* Specific override for the preview overlay labels */
.mat-ctrl-row label.switch {
    min-width: 32px !important;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: .2s;
    border: 1px solid var(--border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    top: 2px;
    background-color: var(--text-dim);
    transition: .2s;
}

input:checked+.slider {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-blue);
}

input:checked+.slider:before {
    transform: translateX(16px);
    background-color: white;
}

.slider.round {
    border-radius: 18px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ── Export Section ── */
.export-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.export-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-blue), #6366f1);
    color: white;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.export-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

.export-button:active {
    transform: translateY(0);
}

.export-button:disabled {
    opacity: 1;
    background: var(--bg-panel-solid);
    color: var(--text-dimmer);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.export-progress {
    text-align: center;
    font-size: 12px;
    color: var(--accent-blue);
    margin-top: 8px;
    font-weight: 500;
    min-height: 18px;
}

/* ── Custom Modal ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    width: 400px;
    max-width: 90%;
    padding: 32px;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
}

.modal-body {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dimmer);
    margin-bottom: 32px;
}

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

.modal-btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    border: none;
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--accent-blue), #6366f1);
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-btn.primary:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Mobile Notice Overlay ── */
.mobile-notice {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-dark);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.mobile-notice .notice-content {
    max-width: 440px;
    background: var(--bg-panel);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 32px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-notice .notice-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-notice h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #fff, var(--text-dim));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.mobile-notice p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dim);
    margin: 0;
}

.mobile-notice .highlight {
    color: var(--accent-blue);
    font-weight: 600;
}

.notice-back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid var(--border-hover);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 8px;
}

.notice-back-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.notice-back-btn:active {
    transform: translateY(0);
}