/* RBXLabs — чёрно-белая тема с оранжевыми акцентами и эффектами (стиль превью) */
:root {
    --bg: #0a0a0a;
    --bg-panel: rgba(18, 18, 18, 0.95);
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.35);
    --border: rgba(255, 255, 255, 0.12);
    --border-accent: rgba(255, 255, 255, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

body {
    font-family: 'Orbitron', 'Rajdhani', -apple-system, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    position: relative;
}

/* Диагональные световые полосы (эффект как на превью) */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.03) 41%, rgba(255,255,255,0.03) 42%, transparent 43%),
        linear-gradient(75deg, transparent 45%, rgba(255,255,255,0.04) 46%, rgba(255,255,255,0.04) 47%, transparent 48%),
        linear-gradient(-30deg, transparent 50%, rgba(255,255,255,0.02) 51%, transparent 52%);
    pointer-events: none;
    z-index: 0;
}

/* Particles / bokeh */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    animation: float linear infinite;
    box-shadow: 0 0 6px rgba(255,255,255,0.2);
}

.particle:nth-child(odd) {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px var(--accent-glow);
}

.particle:nth-child(1) { left: 10%; animation-duration: 15s; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-duration: 20s; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-duration: 18s; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-duration: 22s; animation-delay: 1s; }
.particle:nth-child(5) { left: 50%; animation-duration: 16s; animation-delay: 3s; }
.particle:nth-child(6) { left: 60%; animation-duration: 19s; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-duration: 21s; animation-delay: 2s; }
.particle:nth-child(8) { left: 80%; animation-duration: 17s; animation-delay: 4s; }
.particle:nth-child(9) { left: 90%; animation-duration: 23s; animation-delay: 1s; }
.particle:nth-child(10) { left: 15%; animation-duration: 18s; animation-delay: 3s; }
.particle:nth-child(11) { left: 25%; animation-duration: 20s; animation-delay: 5s; }
.particle:nth-child(12) { left: 35%; animation-duration: 16s; animation-delay: 2s; }
.particle:nth-child(13) { left: 45%; animation-duration: 19s; animation-delay: 4s; }
.particle:nth-child(14) { left: 55%; animation-duration: 22s; animation-delay: 1s; }
.particle:nth-child(15) { left: 65%; animation-duration: 17s; animation-delay: 3s; }

@keyframes float {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* Splash: логотип при загрузке; клики проходят сквозь (pointer-events: none), чтобы навбар работал сразу */
.splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.88);
    opacity: 1;
    pointer-events: none;
    animation: splash-out 0.25s ease-out 0.45s forwards;
}

.splash-overlay .splash-logo {
    width: 140px;
    height: 140px;
    color: var(--text);
    filter: drop-shadow(0 0 25px var(--accent-glow));
}

@keyframes splash-out {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* Гарантированно не блокировать клики после окончания splash (JS добавляет класс) */
.splash-overlay.splash-done {
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left { flex: 1; display: flex; align-items: center; gap: 1.25rem; }
.nav-center { flex: 0 0 auto; display: flex; gap: 1.5rem; align-items: center; position: relative; justify-content: center; }
.nav-right {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
}

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.logo-icon { width: 24px; height: 24px; color: var(--text); }

.page-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 2rem;
}

/* Мягкое пульсирующее свечение логотипа */
@keyframes logo-glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 18px var(--accent-glow)) drop-shadow(0 0 0 currentColor); }
    50% { filter: drop-shadow(0 0 28px var(--accent-glow)) drop-shadow(0 0 8px rgba(255,255,255,0.15)); }
}

.page-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    color: var(--text);
    filter: drop-shadow(0 0 20px var(--accent-glow));
    transition: transform 0.35s ease, filter 0.35s ease;
    animation: logo-glow-pulse 3s ease-in-out infinite;
}

.page-logo:hover {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 0 35px var(--accent-glow)) drop-shadow(0 0 15px rgba(255,255,255,0.2));
    animation: none;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item-wrap { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05em;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--border);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid var(--border-accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.nav-icon { width: 18px; height: 18px; stroke-width: 2; }

/* Main */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 0;
    position: relative;
    z-index: 2;
    width: 100%;
}

.copier-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    width: 520px !important;
    max-width: 520px !important;
    min-width: 520px !important;
    box-sizing: border-box !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 0 1px var(--border),
                0 0 40px var(--accent-glow);
    border: 1px solid var(--border);
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    margin: 0;
    overflow: hidden;
}

.copier-panel.active { display: block; }

.panel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 0 30px var(--accent-glow),
                 0 2px 0 rgba(0,0,0,0.3);
}

.panel-instructions {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.6;
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    min-height: 3.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-container { margin-bottom: 1.5rem; }

.game-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s ease;
    outline: none;
    height: 50px;
    letter-spacing: 0.08em;
}

.game-input:focus {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 30px var(--accent-glow);
    background: rgba(0, 0, 0, 0.5);
}

.game-input.paste-highlight {
    border-color: var(--accent-glow);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 40px var(--accent-glow);
    background: rgba(255, 255, 255, 0.05);
}

.copy-button.paste-highlight {
    box-shadow: 0 0 0 2px var(--accent-glow), 0 0 35px var(--accent-glow);
}

.game-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

/* Tools dropdown — отдельная панель выбора */
.tools-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 240px;
    background: rgba(14, 14, 14, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 0 40px var(--accent-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.tools-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: rgba(14, 14, 14, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
}

.tools-dropdown.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.tools-dropdown-title {
    padding: 1rem 1.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    font-family: 'Orbitron', sans-serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    margin: 0.5rem 0.75rem;
    margin-top: 0.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    background: transparent;
}

.tool-option:last-child {
    margin-bottom: 0.75rem;
}

.tool-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 24px var(--accent-glow);
}

.tool-option.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tool-option-label {
    display: block;
}

/* Features / Info dropdowns — те же стили что и Tools */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 240px;
    background: rgba(14, 14, 14, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 0 40px var(--accent-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: rgba(14, 14, 14, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
}

.nav-dropdown.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.info-dropdown { min-width: 280px; }

.info-dropdown-text {
    padding: 1rem 1.25rem 1.25rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
}

/* Copy button — белый с оранжевым свечением */
.copy-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #e8e8e8 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 12px;
    color: #0a0a0a;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 30px var(--accent-glow);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: 'Orbitron', sans-serif;
}

.copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 50px var(--accent-glow);
    border-color: rgba(255,255,255,0.9);
}

.copy-button:active {
    transform: translateY(0);
}

.copy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.status-message {
    margin-top: 1rem;
    padding: 0.75rem;
    min-height: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    min-height: 20px;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.status-message.success {
    background: rgba(255, 255, 255, 0.1);
    color: #c0c0c0;
    border: 1px solid var(--border);
}

.status-message.error {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border: 1px solid rgba(255,100,100,0.4);
}

.status-message.info {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-accent);
}

/* Loading overlay — new panel (no cookie/refresh mentions) */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.loading-overlay.active { display: flex; }

.loading-panel {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(165deg, rgba(22, 22, 22, 0.98) 0%, rgba(14, 14, 14, 0.98) 100%);
    border: 1px solid var(--border-accent);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 60px var(--accent-glow);
    text-align: center;
    animation: loadingPanelIn 0.2s ease;
    z-index: 0;
}

@keyframes loadingPanelIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.loading-panel-header {
    margin-bottom: 1.75rem;
}

.loading-spinner-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
}

.loading-spinner {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    border: 3px solid var(--border);
    border-top-color: #fff;
    border-right-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    box-shadow: 0 0 24px var(--accent-glow);
}

.loading-spinner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-item-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--text);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.loading-panel-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
}

.loading-panel-body {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.loading-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5));
    border-radius: 999px;
    animation: progressIndeterminate 1.5s ease-in-out infinite;
}

@keyframes progressIndeterminate {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
    100% { transform: translateX(-100%); }
}

.loading-status {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    font-family: 'Rajdhani', sans-serif;
    min-height: 1.4em;
}

.loading-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.loading-timer-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Orbitron', sans-serif;
}

.loading-timer {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    font-family: 'Orbitron', sans-serif;
}

.loading-overlay.show-success .loading-panel {
    display: none !important;
}

.loading-overlay .loading-success {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 1;
}

.loading-overlay .loading-success.is-visible {
    opacity: 1;
}

.loading-success {
    margin-top: 2rem;
    text-align: center;
    width: 100%;
    max-width: 520px;
}

.loading-success-content {
    background: var(--bg-panel);
    border: 2px solid var(--border-accent);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 40px var(--accent-glow);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loading-success-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0a0a0a;
    background: var(--text);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.12em;
    font-family: 'Orbitron', sans-serif;
}

.loading-success-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
}

.loading-success-item-name {
    font-size: 1.35rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.loading-success-message {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.5;
}

/* Feedback block */
.success-feedback-block {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.success-feedback-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-family: 'Rajdhani', sans-serif;
}

.success-feedback-stars {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.feedback-star {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--border);
    cursor: pointer;
    padding: 0.2rem;
    transition: color 0.2s ease, transform 0.15s ease;
}

.feedback-star:hover {
    color: #fff;
    text-shadow: 0 0 12px var(--accent-glow);
}

.feedback-star.active {
    color: #ffd700;
    text-shadow: 0 0 14px rgba(255, 215, 0, 0.8);
}

.feedback-star:hover { transform: scale(1.15); }

.success-feedback-textarea {
    width: 100%;
    min-height: 72px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}

.success-feedback-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.success-feedback-textarea:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

.success-feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.loading-success-button {
    background: linear-gradient(180deg, #fff 0%, #e0e0e0 100%);
    color: #0a0a0a;
    border: 2px solid var(--border);
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 25px var(--accent-glow);
    min-width: 160px;
    letter-spacing: 0.08em;
}

.loading-success-button:hover {
    box-shadow: 0 6px 25px rgba(0,0,0,0.5), 0 0 40px var(--accent-glow);
    transform: translateY(-2px);
}

.loading-success-button:active { transform: translateY(0); }

.loading-success-button-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border-accent);
}

.loading-success-button-secondary:hover {
    background: rgba(255,255,255,0.08);
}

.success-feedback-thanks {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.success-feedback-thanks p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-family: 'Rajdhani', sans-serif;
}

/* Banners */
.success-banner,
.error-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: none;
    z-index: 10001;
    min-width: 300px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

.success-banner {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.error-banner {
    background: rgba(30, 10, 10, 0.95);
    box-shadow: 0 10px 40px rgba(200, 80, 80, 0.2);
    border-color: rgba(255, 100, 100, 0.4);
}

.success-banner.active,
.error-banner.active {
    display: block;
    transform: translateX(0);
}

.banner-content { display: flex; align-items: center; gap: 1rem; }
.banner-icon { font-size: 1.5rem; font-weight: bold; color: var(--text); }
.banner-text { flex: 1; }
.banner-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-family: 'Orbitron', sans-serif;
}

.banner-item-name,
.banner-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Rajdhani', sans-serif;
}

.banner-close {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.banner-close:hover { background: rgba(255, 255, 255, 0.1); }

/* Error banner Retry button — show only when retry is available (connection/rate limit failed) */
.error-banner .error-banner-retry {
    display: none;
    margin-right: 0.5rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.error-banner .error-banner-retry:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
}
.error-banner[data-retry-type="game"] .error-banner-retry,
.error-banner[data-retry-type="clothing"] .error-banner-retry {
    display: inline-block;
}

/* ========== Планшеты и узкий экран ========== */
@media (max-width: 768px) {
    .navbar { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
    .nav-center { gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
    .nav-link {
        padding: 0.6rem 0.85rem;
        min-height: 44px;
        min-width: 44px;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(255,255,255,0.1);
        touch-action: manipulation;
    }
    .nav-link span { display: none; }
    .nav-icon { width: 22px; height: 22px; }
    .copier-panel {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem) !important;
        max-width: none !important;
        min-width: 0 !important;
        left: 50%;
        transform: translate(-50%, -50%);
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .panel-title { font-size: 1.6rem; letter-spacing: 0.06em; }
    .game-input { height: 48px; font-size: 1rem; padding: 0.85rem 1rem; }
    .copy-button { min-height: 48px; padding: 0.9rem 1.5rem; font-size: 0.95rem; }
    .tools-dropdown, .nav-dropdown {
        min-width: 200px;
        max-width: min(280px, calc(100vw - 2rem));
        right: 0;
        left: auto;
    }
    .tool-option { min-height: 48px; padding: 0.85rem 1.25rem; font-size: 1rem; }
    .loading-panel { max-width: 92%; padding: 1.75rem 1.25rem; }
    .loading-success-content { padding: 1.75rem 1.25rem; }
    .loading-success-button { min-height: 48px; min-width: 140px; padding: 0.9rem 1.25rem; }
    .feedback-star { min-width: 44px; min-height: 44px; font-size: 1.85rem; padding: 0.35rem; }
    .success-banner, .error-banner { left: 10px; right: 10px; min-width: 0; max-width: none; }
}

/* ========== Телефон — полная мобильная версия ========== */
@media (max-width: 480px) {
    body { padding: 0; -webkit-text-size-adjust: 100%; }
    .navbar {
        padding: 0.6rem 0.75rem;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        gap: 0.35rem;
    }
    .nav-left, .nav-right { flex: 0 0 auto; }
    .nav-center { flex: 1; justify-content: center; gap: 0.35rem; min-width: 0; }
    .nav-link {
        padding: 0.65rem 0.75rem;
        min-height: 48px;
        min-width: 48px;
        border-radius: 12px;
    }
    .nav-icon { width: 24px; height: 24px; }
    .logo { width: 44px; height: 44px; }
    .logo-icon { width: 26px; height: 26px; }
    .brand-name { font-size: 1.1rem; }
    .page-logo { width: 100px; height: 100px; }
    .page-logo-container { margin-bottom: 1.5rem; padding-top: 1.5rem; }
    .copier-panel {
        width: calc(100% - 1rem) !important;
        margin: 0.5rem;
        padding: 1.25rem 1rem;
        border-radius: 16px;
        max-height: 85vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .panel-title { font-size: 1.4rem; letter-spacing: 0.05em; margin-bottom: 0.85rem; }
    .panel-instructions { font-size: 0.85rem; margin-bottom: 1.25rem; }
    .input-container { margin-bottom: 1.25rem; }
    .game-input {
        height: 52px;
        font-size: 16px; /* убирает зум при фокусе на iOS */
        padding: 1rem 1rem;
        border-radius: 14px;
    }
    .copy-button {
        min-height: 52px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        letter-spacing: 0.1em;
        border-radius: 14px;
        -webkit-tap-highlight-color: rgba(255,255,255,0.15);
        touch-action: manipulation;
    }
    .tools-dropdown, .nav-dropdown, .info-dropdown {
        right: 0;
        left: auto;
        min-width: 180px;
        max-width: min(320px, calc(100vw - 2rem));
        width: max-content;
        border-radius: 14px;
    }
    .tool-option {
        min-height: 52px;
        padding: 1rem 1.25rem;
        font-size: 1.05rem;
        -webkit-tap-highlight-color: rgba(255,255,255,0.1);
        touch-action: manipulation;
    }
    .tools-dropdown-title, .tools-dropdown-title { padding: 1rem 1.25rem; font-size: 0.95rem; }
    .loading-overlay { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
    .loading-panel { max-width: 96%; padding: 1.5rem 1rem; border-radius: 16px; }
    .loading-item-name { font-size: 1.25rem; }
    .loading-success-content { padding: 1.5rem 1rem; max-width: 96%; border-radius: 16px; }
    .loading-success-title { font-size: 1.35rem; }
    .loading-success-button, .loading-success-button-secondary {
        min-height: 52px;
        width: 100%;
        max-width: 280px;
        padding: 1rem;
        font-size: 1rem;
        -webkit-tap-highlight-color: rgba(255,255,255,0.15);
        touch-action: manipulation;
    }
    .success-feedback-actions { flex-direction: column; gap: 0.75rem; }
    .success-feedback-actions .loading-success-button { max-width: none; }
    .feedback-star { min-width: 48px; min-height: 48px; font-size: 2rem; padding: 0.4rem; }
    .success-feedback-textarea { min-height: 80px; padding: 0.85rem; font-size: 16px; }
    .success-feedback-label { font-size: 1rem; }
    .success-banner, .error-banner {
        left: max(0.5rem, env(safe-area-inset-left));
        right: max(0.5rem, env(safe-area-inset-right));
        top: max(0.5rem, env(safe-area-inset-top));
        min-width: 0;
        padding: 1rem;
    }
    .banner-close { min-width: 44px; min-height: 44px; }
}
