/* ═══════════════════════════════════════════════════════
   INSULT GENERATOR — insultgenerator.css
   Purple theme (MOD_06 // PSY-OPS)
   REDESIGNED — Modern, dramatic, user-friendly
   ═══════════════════════════════════════════════════════ */

/* === ATMOSPHERE === */
body {
    background-color: #030303;
    color: #a3a3a3;
    overflow-x: hidden;
}

.bg-industrial-floor {
    position: fixed; inset: 0; z-index: -3;
    background-image:
        linear-gradient(rgba(20,20,20,0.8) 2px, transparent 2px),
        linear-gradient(90deg, rgba(20,20,20,0.8) 2px, transparent 2px),
        linear-gradient(rgba(50,50,50,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50,50,50,0.1) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    background-color: #080808;
}
.bg-grunge-noise {
    position: fixed; inset: 0; z-index: -2; opacity: 0.04; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-vignette-heavy {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.85) 100%);
}

/* === SCREWS === */
.screw {
    width: 14px; height: 14px;
    background: linear-gradient(145deg, #3a3a3a, #1a1a1a);
    border-radius: 50%; border: 1px solid #0a0a0a;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.8), inset 1px 1px 1px rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
}
.screw::after {
    content: '';
    width: 60%; height: 2px;
    background: #0a0a0a;
    transform: rotate(45deg);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

/* === UTILITY === */
.text-shadow-heavy { text-shadow: 3px 3px 2px rgba(0,0,0,1); }

/* === PAGE TRANSITION === */
#transition-overlay {
    position: fixed; inset: 0;
    background: #030303; z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
#transition-overlay.active { opacity: 1; pointer-events: all; }

/* === HEADER === */
.insult-header {
    position: relative;
    background: #141414;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(90deg, transparent, #a855f7, transparent) 1;
    padding: 24px 36px;
    box-shadow: 0 8px 32px rgba(168,85,247,0.08);
    overflow: hidden;
}
.insult-header::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(45deg, #141414, #141414 15px, #0a0a0a 15px, #0a0a0a 30px);
    opacity: 0.08;
    pointer-events: none;
}
.insult-header h1 {
    font-family: 'Black Ops One', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #e5e5e5;
    letter-spacing: 3px;
    position: relative; z-index: 1;
}
.insult-header h1 span { color: #a855f7; }
.insult-header h1 i { color: #a855f7; }

.insult-subtitle {
    margin-top: 12px;
    display: flex; align-items: center; gap: 12px;
    background: #0a0a0a;
    border: 2px solid #1e1e1e;
    padding: 8px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.insult-subtitle span {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #737373;
    letter-spacing: 3px;
}

/* === CHAT PANEL === */
.chat-panel {
    background: #141414;
    border: 2px solid #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
    transition: border-color 0.3s;
}
.chat-panel:hover { border-color: #2a2a2a; }

.chat-panel-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px;
    background: #0a0a0a;
    border-bottom: 1px solid #1e1e1e;
}
.chat-panel-header i { color: #a855f7; font-size: 14px; }
.chat-panel-header .panel-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #a855f7;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.chat-panel-header .live-indicator {
    margin-left: auto;
    display: flex; align-items: center; gap: 6px;
}
.chat-panel-header .live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
}
.chat-panel-header .live-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: #737373;
    letter-spacing: 2px;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #22c55e; }
    50% { opacity: 0.5; box-shadow: 0 0 4px #22c55e; }
}

/* === CHAT AREA === */
.chat-body {
    padding: 20px;
}

#chat-area {
    min-height: 240px;
    max-height: 420px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}

/* Custom scrollbar */
#chat-area::-webkit-scrollbar { width: 4px; }
#chat-area::-webkit-scrollbar-track { background: #0a0a0a; border-radius: 2px; }
#chat-area::-webkit-scrollbar-thumb { background: #a855f733; border-radius: 2px; }
#chat-area::-webkit-scrollbar-thumb:hover { background: #a855f766; }

/* Chat messages */
.chat-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    animation: chatSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: background 0.2s;
}
.chat-line:hover {
    background: rgba(168, 85, 247, 0.04);
}

.chat-line .chat-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(168, 85, 247, 0.6);
    flex-shrink: 0;
    min-width: 55px;
    padding-top: 1px;
}
.chat-line .chat-msg {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: #d4d4d4;
    line-height: 1.5;
}

.chat-line.system-msg .chat-tag { color: #737373; }
.chat-line.system-msg .chat-msg { color: #525252; font-style: italic; }

@keyframes chatSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === GENERATE BUTTON === */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid #a855f733;
    border-radius: 10px;
    background: linear-gradient(135deg, #a855f710, #a855f705);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.generate-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #a855f720, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.generate-btn:hover {
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.25);
}
.generate-btn:hover::before { opacity: 1; }
.generate-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.15);
}

.generate-btn i {
    font-size: 18px;
    color: #a855f7;
    transition: transform 0.3s;
}
.generate-btn:hover i { transform: rotate(90deg); }

.generate-btn .btn-text {
    font-family: 'Black Ops One', cursive;
    font-size: 16px;
    color: #a855f7;
    letter-spacing: 4px;
}

/* Keyboard hint */
.generate-btn .kb-hint {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: #525252;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    padding: 2px 6px;
    margin-left: 8px;
    letter-spacing: 1px;
}

/* === CHAT FOOTER === */
.chat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #1a1a1a;
}
.chat-counter {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #525252;
    letter-spacing: 2px;
}
.chat-counter span { color: #a855f7; font-weight: bold; }

.copy-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #525252;
    background: none;
    border: 1px solid #1e1e1e;
    border-radius: 5px;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.copy-btn:hover {
    color: #a855f7;
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.05);
}
.copy-btn.copied {
    color: #22c55e;
    border-color: #22c55e;
}

/* === TOXICITY METER === */
.toxicity-section {
    margin-top: 20px;
}
.toxicity-panel {
    background: #141414;
    border: 2px solid #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.toxicity-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px;
    background: #0a0a0a;
    border-bottom: 1px solid #1e1e1e;
}
.toxicity-header i { color: #ef4444; font-size: 14px; }
.toxicity-header span {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.toxicity-body {
    padding: 20px;
}
.toxicity-bar-wrap {
    height: 12px;
    background: #0a0a0a;
    border: 1px solid #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}
.toxicity-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #eab308, #ef4444, #dc2626);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}
.toxicity-labels {
    display: flex;
    justify-content: space-between;
}
.toxicity-labels span {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: #525252;
    letter-spacing: 1px;
}
.toxicity-level {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #1a1a1a;
}
.toxicity-level .level-text {
    font-family: 'Black Ops One', cursive;
    font-size: 18px;
    letter-spacing: 3px;
    transition: color 0.3s;
}
.toxicity-level .level-sub {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #525252;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* === QUICK ACTIONS === */
.quick-actions {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.quick-btn {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 16px;
    color: #525252;
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.quick-btn:hover {
    color: #a855f7;
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.05);
}
.quick-btn i { font-size: 10px; }

/* === STATS ROW === */
.stats-row {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.stat-card {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s;
}
.stat-card:hover { border-color: #2a2a2a; }
.stat-value {
    font-family: 'Black Ops One', cursive;
    font-size: 24px;
    color: #a855f7;
    line-height: 1;
}
.stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    color: #525252;
    letter-spacing: 2px;
    margin-top: 6px;
}

/* === FOOTER === */
.insult-footer {
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, transparent, #a855f733, transparent) 1;
    background: #0a0a0a;
    padding: 24px;
    text-align: center;
}
.insult-footer p {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #525252;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .insult-header { padding: 20px 20px; }
    .insult-header h1 { font-size: 1.8rem; }
    .chat-body { padding: 14px; }
    .stats-row { grid-template-columns: 1fr; }
    .quick-actions { flex-direction: column; }
    .quick-btn { justify-content: center; }
    .generate-btn .kb-hint { display: none; }
}
