/* ===========================
   Design System - Professional Minimalist B&W
   - Max width: 1200px
   - Grid: 8px base
   - Font: Inter
   =========================== */

:root {
    --bg: #000000;
    --bg-elevated: #0a0a0a;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --muted: #666666;
    --card: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --accent: #ffffff;
    --accent-dim: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

/* Grain and spotlight effects disabled for pure black background */

/* ===========================
   Tier Topography Background
   =========================== */

.topo-background {
    display: none;
}

/* Ensure all content is above the background */
.header,
.hero,
.product-preview,
.how-it-works,
.features,
.faq,
.final-cta,
.footer {
    position: relative;
    z-index: 1;
}

/* Make sure sections don't block the AI sidebar - prevent capturing events in the sidebar area */
.how-it-works,
.features,
.faq,
.final-cta,
.footer,
.product-preview,
.hero {
    pointer-events: none;
}

/* Re-enable pointer events for interactive elements within sections */
.how-it-works *,
.features *,
.faq *,
.final-cta *,
.footer *,
.product-preview *,
.hero * {
    pointer-events: auto;
}

/* Also re-enable for buttons and links specifically */
.how-it-works a,
.how-it-works button,
.features a,
.features button,
.faq a,
.faq button,
.final-cta a,
.final-cta button,
.footer a,
.footer button,
.hero a,
.hero button {
    pointer-events: auto !important;
}

/* ===========================
   Typography
   =========================== */

h1 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
}

h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

h3 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

p {
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ===========================
   Buttons
   =========================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: var(--text);
    letter-spacing: -0.01em;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary {
    background: #ffffff;
    color: #0a0a0a;
    border: 1px solid #ffffff;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: #f0f0f0;
    border-color: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
}

.btn-icon {
    margin-right: 8px;
    flex-shrink: 0;
}

.btn-large {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.btn-text {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 200ms ease;
}

.btn-text:hover {
    color: var(--text);
}

/* ===========================
   Header
   =========================== */

.header {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 100;
}

/* When sidebar is active, ensure header doesn't block it */
.ai-sidebar.active ~ .header,
body:has(.ai-sidebar.active) .header {
    z-index: 99;
}

.header-container {
    width: calc(100% - 200px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-left: 0;
}

.logo img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
}

.browse-btn {
    margin-left: auto;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 200ms ease;
    cursor: pointer;
}

.browse-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav {
    display: flex;
    gap: 28px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 200ms ease;
}

.nav-link:hover {
    color: var(--text);
}

/* ===========================
   Hero Section
   =========================== */

.hero {
    padding: 80px 24px 56px;
    text-align: center;
}

.hero-container {
    max-width: 680px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 64px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 30px rgba(255, 255, 255, 0.2);
}

/* ===========================
   Tier List Info Section
   =========================== */

.tierlist-info {
    width: calc(100% - 200px);
    max-width: 1400px;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.tierlist-start-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 56px;
    align-self: center;
}

.tierlist-name-input {
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 42px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    text-align: left;
}

.tierlist-name-input::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

.tierlist-bio-input {
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-secondary);
    outline: none;
    resize: none;
    line-height: 1.5;
    text-align: left;
}

.tierlist-bio-input::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

/* Text Format Toolbar */
.text-format-toolbar {
    display: none;
    flex-wrap: wrap;
    gap: 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 8px;
}

.editor-mode .text-format-toolbar {
    display: flex;
}

.toolbar-target {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    margin-right: 8px;
}

.format-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.format-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-buttons {
    display: flex;
    gap: 4px;
}

.format-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.format-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.color-buttons {
    gap: 6px;
}

.format-btn.color-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
}

.format-btn.color-btn.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--accent);
}

.color-picker-input {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

.hero-trust {
    font-size: 14px;
    color: rgba(166, 173, 187, 0.7);
    margin-top: 32px;
}

/* Templates Section */
.templates-section {
    margin-top: 48px;
    text-align: center;
    padding: 0 16px;
}

.templates-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.templates-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.template-card {
    display: block;
    width: 280px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.template-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.template-card:hover .template-image img,
.template-card:hover .template-image {
    transform: scale(1.02);
}

.template-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-play {
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.template-info {
    padding: 16px;
    text-align: left;
}

.template-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.template-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Featured Tier Lists */
.featured-tierlists {
    margin-top: 24px;
    text-align: center;
}

.featured-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 12px;
}

.featured-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.featured-link:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.featured-icon {
    font-size: 18px;
}

/* ===========================
   Hero Embedded Tier List
   =========================== */

.hero-tierlist {
    width: calc(100% - 200px);
    max-width: 1400px;
    margin: 50px auto 32px;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    overflow: visible;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.03);
}

.mini-tierlist {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    border-radius: 8px;
}

.mini-tier-row {
    display: flex;
    min-height: 140px;
    background: #141414;
    overflow: hidden;
}

.mini-tier-label {
    width: 120px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 24px;
    color: #1a1a1a;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    padding: 8px 6px;
    hyphens: auto;
}

.mini-tier-label.tier-s { background: #ff7f7f; }
.mini-tier-label.tier-a { background: #ffbf7f; }
.mini-tier-label.tier-b { background: #ffdf7f; }
.mini-tier-label.tier-c { background: #ffff7f; }
.mini-tier-label.tier-d { background: #bfff7f; }

.mini-tier-items {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    min-height: 100px;
    transition: background 0.15s ease;
    position: relative;
}

.mini-tier-items.drag-over {
    background: rgba(255, 255, 255, 0.1);
    outline: 3px dashed rgba(255, 255, 255, 0.8);
    outline-offset: -3px;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.mini-tier-items .pool-item {
    pointer-events: auto;
}

/* Tier Move Controls */
.tier-move-controls {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.editor-mode .tier-move-controls {
    display: flex;
}

.tier-move-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.tier-move-btn:hover {
    background: var(--accent);
    color: white;
}

.tier-move-btn,
.tier-move-btn:focus,
.tier-move-btn:focus-visible,
.tier-move-btn:focus-within,
.tier-move-btn:visited,
.tier-move-btn:target,
.tier-move-btn:not(:hover):not(:active) {
    outline: none !important;
    box-shadow: none !important;
}

.tier-move-btn:not(:hover):not(:active) {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--muted) !important;
}

.tier-move-btn:active {
    background: var(--accent) !important;
    color: white !important;
}

.tier-move-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tier-move-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted);
}

.tierlist-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: #0f0f0f;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2px;
    position: relative;
    z-index: 5;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
    min-width: 140px;
}

.upload-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.upload-btn svg {
    opacity: 0.8;
    flex-shrink: 0;
}

.upload-btn span {
    white-space: nowrap;
}

/* Remove Background Toggle */
.remove-bg-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.remove-bg-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.remove-bg-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: all 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.remove-bg-toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.remove-bg-toggle input:checked + .toggle-slider::after {
    left: 18px;
}

.toggle-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.remove-bg-toggle:has(input:checked) .toggle-label {
    color: var(--accent);
}

.toolbar-spacer {
    flex: 1;
}

.edit-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.8;
}

.edit-mode-btn:hover {
    opacity: 1;
}

.edit-mode-btn.active {
    color: #0a0a0a;
    background: #ffffff;
    border-radius: 6px;
}

.edit-mode-btn svg {
    stroke: currentColor;
}

.item-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #0f0f0f;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 120px;
    align-items: center;
}

.item-pool:empty::before,
.pool-label {
    color: var(--muted);
    font-size: 13px;
    opacity: 0.6;
}

.pool-label {
    display: block;
    width: 100%;
    text-align: center;
}

.item-pool:has(.pool-item) .pool-label {
    display: none;
}

.pool-item {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
    background: transparent;
    position: relative;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pool-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.pool-item:active {
    cursor: grabbing;
}

.pool-item.dragging {
    opacity: 0.5;
    will-change: transform;
}

/* Touch drag ghost (for mobile dragging) */
.touch-drag-ghost {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.pool-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    background: transparent;
}

.pool-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.item-pool.drag-over {
    background: rgba(255, 255, 255, 0.08);
    outline: 3px dashed rgba(255, 255, 255, 0.8);
    outline-offset: -3px;
}

/* Tier List Action Buttons */
.tierlist-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.action-btn svg {
    opacity: 0.8;
    flex-shrink: 0;
}

.action-btn span {
    white-space: nowrap;
}

.action-btn.collab-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.action-btn svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.action-btn:hover svg {
    opacity: 1;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-btn .spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pool-item .remove-item {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: rgba(220, 38, 38, 0.95);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.15s, background 0.15s;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    /* Expand clickable area without changing visual size */
    padding: 0;
    margin: 0;
}

.pool-item .remove-item::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;
}

.pool-item:hover .remove-item {
    opacity: 1;
}

.editor-mode .pool-item .remove-item {
    opacity: 1;
    background: rgba(220, 38, 38, 0.95);
    width: 30px;
    height: 30px;
    font-size: 20px;
}

.editor-mode .pool-item .remove-item:hover,
.pool-item .remove-item:hover {
    transform: scale(1.15);
    background: #dc2626;
}

/* ===========================
   File Drop Overlay
   =========================== */

.file-drop-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 25, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.file-drop-overlay.active {
    display: flex;
    pointer-events: auto;
}

.file-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 80px;
    border: 3px dashed rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    animation: dropPulse 2s ease-in-out infinite;
}

@keyframes dropPulse {
    0%, 100% { border-color: rgba(255, 255, 255, 0.6); transform: scale(1); }
    50% { border-color: rgba(255, 255, 255, 0.9); transform: scale(1.02); }
}

.file-drop-content svg {
    color: #CCCCCC;
}

.file-drop-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.file-drop-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ===========================
   Image Lightbox
   =========================== */

.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    z-index: 2147483647 !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-lightbox.active {
    display: flex;
    pointer-events: auto;
    position: fixed;
    inset: 0;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: none;
    opacity: 1;
}

.image-lightbox video {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 20001;
    pointer-events: auto;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.98);
}

.lightbox-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lightbox-actions {
    display: flex;
    position: relative;
    z-index: 10;
    gap: 12px;
    margin-top: 8px;
}

.lightbox-actions .lightbox-btn {
    flex: 1;
}

.lightbox-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 160px;
}

.lightbox-add-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.lightbox-add-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.lightbox-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-edit-btn {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.lightbox-edit-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.lightbox-edit-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    max-width: 400px;
}

.lightbox-edit-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.lightbox-edit-input:focus {
    border-color: #60a5fa;
}

.lightbox-edit-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.lightbox-edit-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-edit-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
}

/* ===========================
   Tier Edit Modal
   =========================== */

.tier-edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 15000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.tier-edit-modal.active {
    display: flex;
}

.tier-edit-content {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.tier-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tier-edit-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.tier-edit-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tier-edit-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tier-edit-body {
    padding: 24px;
    display: flex;
    gap: 24px;
}

.tier-edit-preview {
    width: 80px;
    min-height: 80px;
    height: auto;
    padding: 12px 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #000;
    flex-shrink: 0;
    background: #ff7f7f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
}

.tier-edit-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tier-edit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tier-edit-field label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-edit-field input[type="text"] {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.tier-edit-field input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.color-picker-row {
    display: flex;
    gap: 8px;
}

.color-picker-row input[type="color"] {
    width: 44px;
    height: 38px;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.color-picker-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker-row input[type="color"]::-webkit-color-swatch {
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.color-picker-row input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: monospace;
    outline: none;
}

.tier-edit-presets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tier-edit-presets label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.color-preset {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.color-preset.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.tier-edit-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tier-edit-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-edit-btn.cancel {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-edit-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.tier-edit-btn.save {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.tier-edit-btn.save:hover {
    background: #f0f0f0;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.mini-tier-label {
    cursor: default;
    transition: filter 0.15s, transform 0.15s;
}

/* Editor mode styles */
.editor-mode .mini-tier-label {
    cursor: pointer;
    outline: 2px dashed rgba(255, 255, 255, 0.6);
    outline-offset: -2px;
    animation: pulse-edit 2s infinite;
}

@keyframes pulse-edit {
    0%, 100% { outline-color: rgba(255, 255, 255, 0.8); }
    50% { outline-color: rgba(255, 255, 255, 0.3); }
}

.editor-mode .mini-tier-label:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
    outline-color: var(--accent);
}

/* ===========================
   AI Generate Modal
   =========================== */

/* AI button now uses base upload-btn styles */

/* ===========================
   AI Sidebar Chat
   =========================== */

.ai-sidebar {
    position: fixed;
    top: 120px;
    right: -420px;
    width: 400px;
    height: calc(100% - 120px);
    background: #0a0a0a;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
    border-top-left-radius: 12px;
    overflow: visible;
    pointer-events: auto !important;
    contain: none;
}

.ai-sidebar,
.ai-sidebar *,
.ai-sidebar *::before,
.ai-sidebar *::after {
    pointer-events: auto !important;
}

.ai-sidebar.active {
    right: 0;
}

/* AI Sidebar Overlay - covers background when chat is open */
.ai-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2147483646;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ai-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Minimized AI Tab */
.ai-minimized-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 16px 12px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #0a0a0a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255, 255, 255, 0.1);
}

.ai-minimized-tab.visible {
    opacity: 1;
    visibility: visible;
}

@keyframes tabPulse {
    0%, 100% { box-shadow: -4px 0 30px rgba(255, 255, 255, 0.15), 0 0 20px rgba(255, 255, 255, 0.1); }
    50% { box-shadow: -6px 0 40px rgba(255, 255, 255, 0.25), 0 0 30px rgba(255, 255, 255, 0.15); }
}

.ai-minimized-tab:hover {
    background: #f0f0f0;
    box-shadow: -6px 0 40px rgba(255, 255, 255, 0.25), 0 0 30px rgba(255, 255, 255, 0.15);
}

.ai-tab-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
}

.ai-minimized-tab:hover .ai-tab-arrow {
    animation: none;
}

.ai-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-tab-text {
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.ai-tab-badge {
    display: none;
    width: 10px;
    height: 10px;
    background: #FFFFFF;
    border-radius: 50%;
    margin-left: 4px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.ai-tab-badge.has-images {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.ai-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: auto;
}

.ai-sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: white;
}

.ai-sidebar-title svg {
    color: #CCCCCC;
}

.ai-sidebar-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    pointer-events: auto;
}

.ai-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.ai-sidebar-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    pointer-events: auto !important;
    overscroll-behavior: contain;
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    min-height: 0;
    pointer-events: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.ai-message {
    display: flex;
    gap: 12px;
    max-width: 95%;
}

.ai-message-bot {
    align-self: flex-start;
}

.ai-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.ai-message-user .ai-message-avatar {
    background: rgba(255, 255, 255, 0.08);
}

.ai-message-content {
    background: rgba(255, 255, 255, 0.06);
    padding: 12px 16px;
    border-radius: 12px;
    border-top-left-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

.ai-message-user .ai-message-content {
    background: #ffffff;
    border-radius: 12px;
    border-top-right-radius: 4px;
    color: #0a0a0a;
}

.ai-message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.ai-generated-image {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
    will-change: transform;
}

.ai-generated-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.ai-generated-image .zoom-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.ai-generated-image:hover .zoom-icon {
    opacity: 1;
}

.ai-generated-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
    border-color: #22c55e;
}

.ai-generated-image:active {
    opacity: 0.8;
    transform: scale(0.98);
}

.ai-add-to-pool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 180px;
    padding: 8px 12px;
    margin-top: 6px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.ai-add-to-pool-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ai-add-to-pool-btn:active {
    transform: translateY(0);
}

.ai-add-to-pool-btn.added {
    background: #374151;
    cursor: default;
}

.ai-image-buttons {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.ai-edit-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    color: #60a5fa;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.ai-edit-image-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-1px);
}

.ai-edit-input-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.ai-edit-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.ai-edit-input:focus {
    border-color: #60a5fa;
}

.ai-edit-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ai-edit-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-edit-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
}

.ai-edit-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-image-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    position: relative;
    z-index: 10;
}

.ai-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 10;
}

.ai-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.ai-action-btn.regenerate-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--accent);
}

.ai-action-btn.edit-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.ai-action-btn svg {
    opacity: 0.9;
}

.ai-image-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-add-to-pool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-add-to-pool-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.ai-add-to-pool-btn.added {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: default;
}

.ai-add-to-pool-btn:disabled {
    opacity: 0.8;
    cursor: default;
}

.ai-regenerate-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 12px;
    font-style: italic;
}

.ai-options {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
    position: relative;
    pointer-events: auto;
}

.ai-option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-option-group label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-option-buttons {
    display: flex;
    gap: 8px;
}

.ai-option-btn {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.ai-option-btn.active {
    background: #ffffff;
    border-color: transparent;
    color: #0a0a0a;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.ai-custom-count {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.ai-custom-count input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    max-width: 80px;
}

.ai-custom-count input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.ai-custom-count input::-webkit-inner-spin-button,
.ai-custom-count input::-webkit-outer-spin-button {
    opacity: 1;
}

.ai-custom-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* Custom Style Dropdown */
.ai-style-dropdown {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-style-dropdown:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.ai-style-dropdown.active {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ai-style-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.ai-style-arrow {
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.ai-style-dropdown:hover .ai-style-arrow {
    opacity: 0.8;
}

.ai-style-dropdown.active .ai-style-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.ai-style-options {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-style-dropdown.active .ai-style-options {
    grid-template-rows: 1fr;
}

.ai-style-options-inner {
    overflow: hidden;
}

.ai-style-options-inner .ai-style-option {
    padding: 12px 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease, color 0.15s ease;
}

.ai-style-dropdown.active .ai-style-options-inner .ai-style-option {
    opacity: 1;
    transform: translateY(0);
}

.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(1) { transition-delay: 0.05s; }
.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(2) { transition-delay: 0.07s; }
.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(3) { transition-delay: 0.09s; }
.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(4) { transition-delay: 0.11s; }
.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(5) { transition-delay: 0.13s; }
.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(6) { transition-delay: 0.15s; }
.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(7) { transition-delay: 0.17s; }
.ai-style-dropdown.active .ai-style-options-inner .ai-style-option:nth-child(8) { transition-delay: 0.19s; }

.ai-style-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.ai-style-option.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
}

.ai-select {
    width: 100%;
    padding: 12px 14px;
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
    position: relative;
    pointer-events: auto !important;
}

.ai-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.ai-select:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.ai-select option {
    background-color: #1f1f1f;
    color: #e5e5e5;
    padding: 12px;
    font-size: 14px;
}

.ai-select option:hover,
.ai-select option:focus,
.ai-select option:checked {
    background: #2d2d2d;
    background-color: #2d2d2d !important;
    color: #ffffff;
}

.ai-sidebar-footer {
    padding: 16px 20px;
    background: #0d0d0d;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    position: relative;
    pointer-events: auto;
}

.ai-input-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    position: relative;
    pointer-events: auto;
}

.ai-input-container textarea {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    cursor: text;
    position: relative;
    pointer-events: auto !important;
}

.ai-input-container textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ai-input-container textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.ai-send-btn {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    color: #0a0a0a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    pointer-events: auto !important;
}

.ai-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.ai-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-send-btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.ai-typing-indicator span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ai-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* ===========================
   Publish Prompt Modal
   =========================== */
.publish-prompt {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.publish-prompt.active {
    opacity: 1;
    visibility: visible;
}

.publish-prompt-card {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 28px;
    max-width: 420px;
    width: 94%;
    position: relative;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.publish-prompt.active .publish-prompt-card {
    transform: translateY(0) scale(1);
}

.publish-prompt-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.publish-prompt-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.publish-prompt-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
}

.publish-prompt h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.publish-prompt p {
    font-size: 14px;
    color: #888;
    margin-bottom: 24px;
    line-height: 1.5;
}

.publish-prompt-actions {
    display: flex;
    gap: 12px;
}

.publish-prompt-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.publish-prompt-btn.secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
}

.publish-prompt-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.publish-prompt-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    color: #fff;
}

.publish-prompt-btn.primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-1px);
}

.publish-prompt-btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Publish Form */
.publish-form {
    margin: 20px 0;
    text-align: left;
}

.publish-field {
    margin-bottom: 16px;
}

.publish-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #aaa;
    margin-bottom: 6px;
}

.publish-field .label-optional {
    font-weight: 400;
    color: #666;
}

.publish-field .label-required {
    color: #ef4444;
    font-weight: 600;
}

.publish-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.publish-field > input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #fff;
    font-family: inherit;
    height: 40px;
    transition: border-color 0.2s;
}

.publish-field > input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.publish-field > textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #fff;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.publish-field > textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.publish-field > textarea::placeholder {
    color: #555;
}

.publish-field .ai-write-btn {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}

.publish-input-row input,
.publish-input-row textarea {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #fff;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
}

.publish-input-row input {
    height: 40px;
}

.publish-input-row input:focus,
.publish-input-row textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.publish-input-row input::placeholder,
.publish-input-row textarea::placeholder {
    color: #555;
}

.ai-write-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s;
}

.ai-write-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.ai-write-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-write-btn.loading svg {
    animation: spin 1s linear infinite;
}

.publish-input-row .ai-generate-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.publish-input-row .ai-generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.publish-input-row .ai-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.publish-input-row .ai-generate-btn.loading svg {
    animation: spin 1s linear infinite;
}

@media (max-width: 480px) {
    .ai-sidebar {
        width: 100%;
        right: -100%;
        top: 0;
        height: 100%;
        border-radius: 0;
        border-left: none;
        background: #0a0a0a;
    }
    
    .ai-sidebar.active {
        right: 0;
    }
    
    .ai-sidebar-body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .ai-sidebar-overlay {
        display: none;
    }
    
    .ai-minimized-tab {
        padding: 6px 8px 6px 6px;
        gap: 4px;
        font-size: 10px;
        border-radius: 8px 0 0 8px;
        background: #1a1a1a;
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .ai-minimized-tab .ai-tab-icon svg,
    .ai-minimized-tab .ai-tab-arrow svg {
        stroke: #ffffff;
    }
    
    .ai-minimized-tab .ai-tab-arrow svg {
        width: 10px;
        height: 10px;
    }
    
    .ai-minimized-tab .ai-tab-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .ai-tab-text {
        font-size: 9px;
        color: #ffffff;
    }
}

/* ===========================
   Product Preview
   =========================== */

.product-preview {
    padding: 32px 24px 64px;
}

.preview-container {
    max-width: 900px;
    margin: 0 auto;
}

.preview-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1px;
    background: var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border);
}

/* Floating card effect */
.floating-card {
    animation: float 6s ease-in-out infinite;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 8px 48px rgba(255, 255, 255, 0.15),
        0 0 0 1px var(--border);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* CTA Glow Ring Effect */
.cta-glow {
    position: relative;
}

.cta-glow::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 200ms ease;
    z-index: -1;
    filter: blur(15px);
}

.cta-glow:hover::before {
    opacity: 1;
}

.preview-input,
.preview-output {
    background: rgba(6, 7, 11, 0.9);
    padding: 24px;
}

.input-header,
.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.input-label,
.output-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.topic-input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--text);
}

.input-icon {
    color: var(--muted);
    flex-shrink: 0;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.upload-thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid var(--border);
}

.input-options {
    display: flex;
    align-items: center;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch {
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    transition: background 150ms ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text);
    border-radius: 50%;
    transition: transform 150ms ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active {
    background: var(--accent);
}

.toggle-switch.active::after {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 14px;
    color: var(--muted);
}

/* Tier Preview */
.tier-preview {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.tier-row-preview {
    display: flex;
    background: rgba(6, 7, 11, 0.8);
}

.tier-label-preview {
    width: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.1;
    padding: 4px 2px;
}

.tier-label-preview.tier-s { background: #FCA5A5; }
.tier-label-preview.tier-a { background: #FDBA74; }
.tier-label-preview.tier-b { background: #FDE047; }
.tier-label-preview.tier-c { background: #86EFAC; }

.tier-items-preview {
    flex: 1;
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    min-height: 52px;
}

.tier-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 1px solid var(--border);
}

.use-cases {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--muted);
}

/* ===========================
   Section Styles
   =========================== */

.section-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

/* ===========================
   How It Works
   =========================== */

.how-it-works {
    padding: 72px 24px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    text-align: center;
}

.step-number {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 auto 20px;
}

.step-content h3 {
    margin-bottom: 8px;
}

.step-content p {
    font-size: 15px;
}

/* ===========================
   Features
   =========================== */

.features {
    padding: 72px 24px;
    background: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 52px;
    height: 52px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text);
}

.feature h3 {
    margin-bottom: 6px;
    font-size: 16px;
}

.feature p {
    font-size: 14px;
}

/* ===========================
   FAQ
   =========================== */

.faq {
    padding: 72px 24px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-list {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.faq-item.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    cursor: pointer;
    user-select: none;
    transition: padding 0.3s ease;
}

.faq-item.active .faq-question {
    padding-bottom: 12px;
}

.faq-question h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.faq-item.active .faq-question h3 {
    color: #fff;
}

.faq-icon {
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.faq-item:hover .faq-icon {
    opacity: 0.8;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

.faq-answer-inner {
    overflow: hidden;
}

.faq-answer-inner p {
    padding: 0 28px 24px;
    font-size: 15px;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.faq-item.active .faq-answer-inner p {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .faq-list {
        grid-template-columns: 1fr;
    }
    
    /* Collab controls above tier list on mobile */
    .collab-controls {
        top: -45px;
        right: 0;
        flex-direction: row;
        gap: 10px;
    }
    
    .collab-controls .chat-btn {
        width: 36px;
        height: 36px;
    }
    
    .collab-controls .chat-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .collab-controls .collab-indicator {
        padding: 8px 12px;
    }
    
    /* Smaller remove buttons on tablet */
    .pool-item .remove-item {
        width: 22px;
        height: 22px;
        font-size: 14px;
        top: 2px;
        right: 2px;
        border-width: 1.5px;
    }
    
    .editor-mode .pool-item .remove-item {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
    
    /* Tier edit modal responsive on tablet */
    .tier-edit-content {
        max-width: 360px;
    }
    
    .tier-edit-body {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .tier-edit-preview {
        width: 90px;
        min-height: 90px;
    }
    
    .tier-edit-fields {
        width: 100%;
    }
}

/* ===========================
   Final CTA
   =========================== */

.final-cta {
    padding: 96px 24px;
    text-align: center;
    background: transparent;
}

.final-cta h2 {
    margin-bottom: 32px;
}

/* ===========================
   Footer
   =========================== */

.footer {
    padding: 32px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.footer-logo:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    font-size: 14px;
    color: var(--muted);
}

/* ===========================
   Create Modal
   =========================== */

.create-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.create-modal.active {
    opacity: 1;
    visibility: visible;
}

.create-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.create-modal-content {
    position: relative;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.create-modal.active .create-modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--card);
    border-radius: 10px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: none;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.modal-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.modal-input::placeholder {
    color: var(--muted);
}

.modal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.template-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
}

.template-btn.selected {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    color: var(--text);
}

.template-icon {
    font-size: 1.5rem;
}

.btn-create {
    margin-top: 8px;
    justify-content: center;
}

/* ===========================
   Collab Modal
   =========================== */

.collab-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.collab-modal-overlay.active {
    display: flex;
}

.collab-modal {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.collab-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 8px;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.collab-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.collab-view {
    text-align: center;
}

.collab-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #ffffff;
}

.collab-view h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.collab-view > p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.collab-input-group {
    text-align: left;
    margin-bottom: 20px;
}

.collab-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 8px;
}

.collab-input-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.collab-input-group input:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.collab-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.collab-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: #ffffff;
    border: none;
    border-radius: 10px;
    color: #0a0a0a;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.collab-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.3);
}

.collab-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.collab-divider::before,
.collab-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.collab-join-row {
    display: flex;
    gap: 10px;
}

.collab-join-row input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    outline: none;
}

.collab-join-row input:focus {
    border-color: var(--accent);
}

.collab-btn-secondary {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.collab-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

/* Room View */
.collab-room-header {
    margin-bottom: 24px;
}

.room-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.room-label {
    font-size: 13px;
    color: var(--muted);
}

.room-code {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #ffffff;
    font-family: monospace;
}

.copy-code-btn {
    padding: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

.copy-code-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.copy-code-btn:active {
    transform: scale(0.95);
}

.share-hint {
    font-size: 13px;
    color: var(--muted);
}

.collab-users-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.collab-users-section h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 12px;
}

.collab-users-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
}

.collab-users-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
}

.collab-users-list .user-avatar {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.collab-users-list .host-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 10px;
    margin-left: auto;
}

.collab-users-list .view-only-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #CCCCCC;
    border-radius: 10px;
}

.collab-users-list .user-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.collab-users-list .user-manage-hint {
    font-size: 11px;
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.collab-users-list li.user-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-users-list li.user-clickable:hover {
    background: rgba(255, 255, 255, 0.08);
}

.collab-users-list li.user-clickable:hover .user-manage-hint {
    opacity: 1;
}

/* User Action Menu */
.user-action-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 30, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    width: 260px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: menuSlideIn 0.2s ease;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.user-action-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.user-action-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.user-action-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}

.user-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.user-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.user-action-btn svg {
    color: var(--muted);
    flex-shrink: 0;
}

.user-action-btn:hover svg {
    color: var(--accent);
}

.user-action-btn.user-action-danger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.user-action-btn.user-action-danger:hover svg {
    color: #ffffff;
}

.user-action-close {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-action-close:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

/* Confirmation Modal */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.confirm-modal-content {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon svg {
    stroke: #FFFFFF;
}

.confirm-modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.confirm-modal-content p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.confirm-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.confirm-ok {
    background: #ffffff;
    color: #0a0a0a;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.confirm-ok:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.collab-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFFFFF;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #FFFFFF;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.collab-leave-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.collab-leave-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Collab Indicator */
/* Collab Controls Container (above tier list, aligned right) */
.collab-controls {
    display: none;
    position: absolute;
    top: -45px;
    right: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    z-index: 50;
}

.collab-controls.active {
    display: flex;
}

.collab-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.collab-indicator-dot {
    width: 8px;
    height: 8px;
    background: #FFFFFF;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.collab-indicator-text {
    font-size: 13px;
    font-weight: 500;
    color: #FFFFFF;
}

.collab-indicator-count {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 12px;
    color: var(--text);
}

/* Chat Button */
.chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #CCCCCC;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.chat-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.chat-btn svg {
    width: 20px;
    height: 20px;
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #888888;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.3s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Chat Panel */
.chat-panel {
    position: fixed;
    top: 140px;
    right: 20px;
    width: 340px;
    height: 450px;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.chat-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-welcome {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 13px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 85%;
}

.chat-message.own {
    align-self: flex-end;
}

.chat-message.other {
    align-self: flex-start;
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.chat-message-avatar {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.chat-message-name {
    color: var(--muted);
    font-weight: 500;
}

.chat-message-time {
    color: rgba(166, 173, 187, 0.6);
    font-size: 11px;
}

.chat-message-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.own .chat-message-content {
    background: #ffffff;
    color: #0a0a0a;
    border-bottom-right-radius: 4px;
}

.chat-message.other .chat-message-content {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

/* Activity Log Messages */
.chat-activity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.chat-activity-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 10px;
}

.chat-activity.join .chat-activity-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.chat-activity.leave .chat-activity-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.chat-activity.move .chat-activity-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.chat-activity.kick .chat-activity-icon {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.chat-input::placeholder {
    color: var(--muted);
}

.chat-send {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    color: #0a0a0a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms ease;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Chat Input Actions */
.chat-input-actions {
    display: flex;
    gap: 4px;
}

.chat-action-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.chat-action-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 16px;
    right: 16px;
    background: rgba(25, 27, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.emoji-categories {
    display: flex;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
}

.emoji-cat-btn {
    flex: 1;
    padding: 8px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-cat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.emoji-cat-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
}

.emoji-btn {
    padding: 6px;
    background: none;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.15);
}

/* Chat Image */
.chat-message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-message-image:hover {
    transform: scale(1.02);
}

.chat-image-preview {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    cursor: zoom-out;
}

.chat-image-preview img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

/* Collab Toast Notification */
.collab-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.collab-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 900px) {
    .preview-card {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    .hero {
        padding: 64px 24px 48px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .nav {
        display: none;
    }
    
    .hero-tierlist {
        padding: 12px;
        width: calc(100% - 32px);
        margin: 50px 16px 32px;
    }
    
    .tierlist-info {
        width: calc(100% - 32px);
        margin: 0 16px 16px;
        padding-left: 12px;
        gap: 10px;
    }
    
    .header-container {
        width: calc(100% - 32px);
        margin: 0 16px;
        padding: 16px 0;
    }
    
    .logo img {
        height: 60px;
    }
    
    .tierlist-name-input {
        font-size: 22px;
        padding: 6px 0 2px 0;
    }
    
    .tierlist-bio-input {
        font-size: 14px;
        padding: 0 0 10px 0;
    }
    
    .text-format-toolbar {
        gap: 16px;
        padding: 12px 14px;
    }
    
    .format-group {
        gap: 8px;
    }
    
    .format-label {
        font-size: 11px;
    }
    
    .format-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .format-btn.color-btn {
        width: 22px;
        height: 22px;
    }
    
    .mini-tier-row {
        min-height: 70px;
    }
    
    .mini-tier-label {
        width: 60px;
        min-width: 60px;
        font-size: 16px;
        padding: 6px 4px;
    }
    
    .pool-item {
        width: 70px;
        height: 70px;
    }
    
    /* Mobile toolbar buttons */
    .tierlist-toolbar {
        gap: 8px;
        padding: 12px;
    }
    
    .upload-btn {
        padding: 14px 16px;
        font-size: 13px;
        min-width: auto;
        flex: 1;
        min-height: 50px;
    }
    
    .upload-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .edit-mode-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .toolbar-spacer {
        display: none;
    }
    
    /* Mobile action buttons */
    .tierlist-actions {
        gap: 10px;
        padding: 16px 12px;
    }
    
    .action-btn {
        padding: 12px 16px;
        font-size: 13px;
        gap: 8px;
        flex: 1;
        min-width: auto;
    }
    
    .action-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .upload-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .how-it-works,
    .features,
    .faq,
    .final-cta {
        padding: 64px 24px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }
    
    .header-container {
        width: calc(100% - 32px);
        margin: 0 16px;
        padding: 12px 0;
    }
    
    .logo img {
        height: 50px;
    }
    
    .hero {
        padding: 48px 16px 32px;
    }
    
    .product-preview {
        padding: 16px;
    }
    
    .preview-input,
    .preview-output {
        padding: 16px;
    }
    
    .section-container {
        padding: 0 16px;
    }
    
    .btn-large {
        padding: 14px 24px;
        width: 100%;
    }

    .create-modal-content {
        padding: 28px 20px;
    }

    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    /* Extra small mobile toolbar */
    .tierlist-toolbar {
        flex-direction: column;
        gap: 6px;
        padding: 10px;
    }
    
    .upload-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
        font-size: 12px;
        min-height: 40px;
        min-width: auto;
        gap: 6px;
    }
    
    .upload-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .edit-mode-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 12px;
    }
    
    /* Extra small mobile action buttons */
    .tierlist-actions {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 8px;
    }
    
    .action-btn {
        flex: 1 1 45%;
        min-width: auto;
        padding: 10px 12px;
        font-size: 12px;
        gap: 6px;
        min-height: 40px;
    }
    
    .action-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Even smaller remove buttons on small mobile */
    .pool-item .remove-item {
        width: 18px;
        height: 18px;
        font-size: 12px;
        top: 1px;
        right: 1px;
        border-width: 1px;
    }
    
    .editor-mode .pool-item .remove-item {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
    
    /* Full-screen tier edit modal on mobile */
    .tier-edit-modal {
        padding: 0;
        align-items: flex-start;
    }
    
    .tier-edit-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        padding-top: env(safe-area-inset-top, 0);
    }
    
    .tier-edit-header {
        padding-top: 20px;
    }
    
    .tier-edit-body {
        flex-direction: column;
        align-items: center;
        padding: 16px;
        padding-top: 24px;
        gap: 16px;
        flex: 1;
        overflow-y: auto;
    }
    
    .tier-edit-preview {
        width: 100px;
        min-height: 100px;
        font-size: 28px;
    }
    
    .tier-edit-fields {
        width: 100%;
    }
    
    .tier-edit-presets {
        width: 100%;
    }
    
    .color-presets {
        justify-content: center;
    }
    
    .color-preset {
        width: 32px;
        height: 32px;
    }
    
    .tier-edit-footer {
        padding: 12px 16px;
        margin-top: auto;
    }
    
    .tier-edit-btn {
        padding: 14px 20px;
    }
}

/* Touch-friendly mobile drag styles */
@media (hover: none) and (pointer: coarse) {
    .pool-item {
        touch-action: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        will-change: transform, opacity;
    }
    
    .pool-item:active {
        transform: scale(0.95);
    }
    
    .pool-item.dragging {
        opacity: 0.3;
        transform: scale(0.9);
    }
    
    .touch-drag-ghost {
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    .mini-tier-items,
    .item-pool {
        min-height: 80px;
        padding: 10px;
    }
    
    .mini-tier-items.drag-over,
    .item-pool.drag-over {
        background: rgba(255, 255, 255, 0.1);
        border: 2px dashed rgba(255, 255, 255, 0.8);
    }
    
    /* Larger pool items for easier touch */
    .pool-item {
        width: 75px;
        height: 75px;
    }
    
    .mini-tier-items .pool-item {
        width: 70px;
        height: 70px;
    }
    
    /* Remove hover effects on touch devices */
    .pool-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Make remove button always visible on touch */
    .pool-item .remove-item {
        opacity: 1;
        /* Ensure touch events work */
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .pool-item .remove-item:active {
        transform: scale(0.9);
        background: rgba(185, 28, 28, 1);
    }
}
