/* Claude-like Warm Minimalism Design System */
:root {
    --bg-main: #f9f8f6;            /* Warm off-white page background */
    --bg-sidebar: #f1f0ea;         /* Muted warm gray for sidebar */
    --bg-card: #ffffff;            /* Pure white for container panels */
    --bg-input: #ffffff;           /* Input field background */
    --bg-hover: #e8e6df;           /* Subtle gray-beige hover state */
    
    --border-color: #e3e0d8;       /* Thin, sophisticated borders */
    --border-hover: #d0cbc0;       /* Slightly darker border for focus */
    
    --text-primary: #191919;       /* Deep warm charcoal/black */
    --text-secondary: #595650;     /* Muted olive-gray for secondary text */
    --text-muted: #8c887e;         /* Light warm-gray for placeholders */
    
    --color-accent: #c07a3c;       /* Terracotta/Ochre signature accent */
    --color-accent-light: #f7ede2; /* Warm cream tint for active states */
    --color-accent-hover: #a6632a; /* Darker accent hover */
    
    --color-green: #376f4e;        /* Deep pine green for success/healthy state */
    --color-green-light: #e8f4ed;
    --color-rose: #a94442;         /* Deep ruby red for errors/offline state */
    --color-rose-light: #fdf2f2;
    
    --sidebar-width: 280px;
    --border-radius-lg: 14px;
    --border-radius-md: 8px;
    --border-radius-sm: 6px;
    --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* Reset & Focus States */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    height: 100vh;
}

/* Clear Focus States for Keyboard Navigation */
input:focus, select:focus, textarea:focus, button:focus, a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Layout Framework */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Minimalist Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
    padding-left: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: white;
}

.brand-text h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-primary);
}

.brand-text span {
    color: var(--color-accent);
    margin-left: 2px;
}

.version-badge {
    font-size: 10px;
    background: rgba(25, 25, 25, 0.05);
    padding: 2px 6px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 6px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14.5px;
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 1rem;
    width: 18px;
    opacity: 0.7;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(25, 25, 25, 0.03);
}

.nav-item.active {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.nav-item.active i {
    color: var(--color-accent);
    opacity: 1;
}

.docs-link {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    border-radius: 0;
}

.external-icon {
    font-size: 0.75rem !important;
    margin-left: auto;
    opacity: 0.4;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-green-light);
    border: 1px solid rgba(55, 111, 78, 0.15);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    color: var(--color-green);
    font-size: 13px;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-green);
}

/* Main Area Layout */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 1.5rem 2.5rem;
    max-width: 1200px;
    width: calc(100% - var(--sidebar-width));
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.header-title .subtitle {
    color: var(--text-secondary);
    font-size: 14.5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
}

.btn-primary {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
}

.btn-secondary.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

.btn-block {
    width: 100%;
}

/* Tabs System */
.tab-content {
    display: none;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
    animation: simpleFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

@keyframes simpleFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards & Grid Styling */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(25, 25, 25, 0.02);
    transition: var(--transition-smooth);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(25, 25, 25, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 i {
    color: var(--color-accent);
}

.card-badge {
    font-size: 11px;
    background: var(--color-accent-light);
    border: 1px solid rgba(192, 122, 60, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    color: var(--color-accent);
    font-weight: 600;
}

/* Stats Cards */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bg-cyan { background: var(--color-accent-light); color: var(--color-accent); }
.bg-violet { background: rgba(89, 86, 80, 0.05); color: var(--text-secondary); }
.bg-amber { background: var(--color-green-light); color: var(--color-green); }

.stat-info h3 {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.col-span-2 {
    grid-column: span 2;
}

/* Models List Table */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.models-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.models-table th, .models-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.models-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-family: var(--font-heading);
    background: rgba(25, 25, 25, 0.02);
}

.models-table tbody tr {
    transition: var(--transition-smooth);
}

.models-table tbody tr:hover {
    background: rgba(25, 25, 25, 0.01);
}

.models-table td:first-child {
    font-family: monospace;
    font-weight: 700;
    color: var(--text-primary);
}

/* Quick Console styles */
.quick-console {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.console-action h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.console-box {
    display: flex;
    align-items: center;
    background: rgba(25, 25, 25, 0.02);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    gap: 8px;
}

.console-box code {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-primary);
    flex-grow: 1;
    overflow-x: auto;
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    padding: 2px;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    color: var(--color-accent);
}

.quote-box {
    background: rgba(192, 122, 60, 0.03);
    border-left: 2px solid var(--color-accent);
    padding: 10px 14px;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.quote-box p {
    font-style: italic;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.btn-roll {
    background: none;
    border: 1px solid rgba(192, 122, 60, 0.2);
    color: var(--color-accent);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-roll:hover {
    background: var(--color-accent-light);
}

/* SIGNATURE ELEMENT: Claude-like paper chat container */
.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(25, 25, 25, 0.02);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 560px;
    padding: 0 !important;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(25, 25, 25, 0.01);
}

.chat-settings {
    display: flex;
    gap: 16px;
    align-items: center;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.setting-item select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    outline: none;
}

/* Flat Checkbox Design */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 24px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: var(--text-secondary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 15px;
    width: 15px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.checkbox-container:hover input ~ .checkmark {
    background-color: var(--bg-hover);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 1px;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

/* Chat Messages */
.chat-messages {
    flex-grow: 1;
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background-color: #faf9f6;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 85%;
    animation: simpleFade 0.2s ease;
}

.message.user-msg {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant-msg {
    align-self: flex-start;
}

.message.system-msg {
    align-self: center;
    max-width: 90%;
    background: rgba(25, 25, 25, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.user-msg .msg-avatar {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.assistant-msg .msg-avatar {
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-color: rgba(192, 122, 60, 0.15);
}

.system-msg .msg-avatar {
    display: none;
}

.msg-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.user-msg .msg-content {
    background: #eae6dd;
    border-color: #dcd7cc;
    border-top-right-radius: 2px;
}

.assistant-msg .msg-content {
    border-top-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.msg-content p {
    margin-bottom: 8px;
}

.msg-content p:last-child {
    margin-bottom: 0;
}

.msg-content blockquote {
    border-left: 2px solid var(--color-accent);
    padding-left: 8px;
    margin: 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.msg-content pre {
    background: #fdfdfd;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    font-family: monospace;
    font-size: 12.5px;
    margin: 8px 0;
    border: 1px solid var(--border-color);
}

.msg-content code {
    font-family: monospace;
    background: rgba(25, 25, 25, 0.05);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 12.5px;
}

.msg-content pre code {
    background: none;
    padding: 0;
}

/* Citations sources list */
.citation-sources {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.citation-sources span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.citation-link {
    font-size: 11px;
    background: rgba(25, 25, 25, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.citation-link:hover {
    color: var(--color-accent);
    background: var(--color-accent-light);
    border-color: rgba(192, 122, 60, 0.2);
}

/* Input area wrapper */
.chat-input-area {
    display: flex;
    padding: 1rem 1.5rem;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.chat-input-area textarea {
    flex-grow: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    resize: none;
    transition: var(--transition-smooth);
    max-height: 80px;
}

.chat-input-area textarea:focus {
    border-color: var(--color-accent);
}

.btn-send {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    border-radius: var(--border-radius-md);
    flex-shrink: 0;
}

/* Embeddings similarity card layout */
.embeddings-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.25rem;
}

.similarity-score-container {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 1.5rem;
    background: rgba(25, 25, 25, 0.01);
    padding: 1.25rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.score-radial {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle-fill {
    transition: stroke-dashoffset 0.6s ease-in-out;
}

.score-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.score-label h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.score-label p {
    color: var(--text-secondary);
    font-size: 13px;
}

.vector-dimensions h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.vector-sample-box {
    background: #fbfbfb;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
}

.vector-sample-box h5 {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}

.vector-sample-box code {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 12px;
    word-break: break-all;
}

/* Playground Config */
.playground-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13.5px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
}

.params-section {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.playground-response {
    display: flex;
    flex-direction: column;
    max-height: 520px;
}

.response-meta {
    display: flex;
    gap: 6px;
}

.badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    background: var(--bg-hover);
}

.badge.status-200 {
    background: var(--color-green-light);
    border: 1px solid rgba(55, 111, 78, 0.15);
    color: var(--color-green);
}

.badge.status-error {
    background: var(--color-rose-light);
    border: 1px solid rgba(169, 68, 66, 0.15);
    color: var(--color-rose);
}

.code-container {
    background: #fdfdfd;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.code-container pre {
    height: 100%;
    overflow-y: auto;
    margin: 0;
}

.code-container code {
    font-family: monospace;
    color: var(--text-primary);
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}

.btn-copy-code {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-copy-code:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Utilities Tab */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.col-span-full {
    grid-column: 1 / -1;
}

.tool-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 1px solid var(--border-color);
}

.tool-card h2 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

/* Slider Controls */
.slider-group {
    margin-bottom: 12px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.slider-header span:last-child {
    color: var(--color-accent);
    font-weight: 700;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: var(--border-color);
    height: 4px;
    border-radius: 2px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-hover);
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Results box */
.tool-result {
    background: rgba(25, 25, 25, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    min-height: 60px;
}

.rolled-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
}

.uuid-output {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    word-break: break-all;
}

.quote-display-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.quote-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Toast alert notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: white;
    padding: 10px 18px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(150%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateY(0);
}

/* Responsive Layout rules */
@media (max-width: 1200px) {
    .embeddings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .playground-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .col-span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .brand {
        margin-bottom: 1.5rem;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .top-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .chat-container {
        height: 480px;
    }
    
    .chat-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Imagen Studio UI Grid & Gallery */
.imagen-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .imagen-grid {
        grid-template-columns: 1fr;
    }
}

/* Spinner Styles */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* History Gallery Styles */
.history-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-item {
    position: relative;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    aspect-ratio: 1 / 1;
    background: var(--bg-hover);
}

.history-item:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-item .history-tooltip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(25, 25, 25, 0.85);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.history-item:hover .history-tooltip {
    opacity: 1;
}

@media (max-width: 768px) {
    /* Mobile key container display is managed by JS and checkbox */
}

.mobile-keys-container button {
    border-radius: 50% !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: all 0.1s ease;
}

.mobile-keys-container button:active {
    transform: scale(0.9) !important;
    background-color: var(--color-accent-light) !important;
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
}

.mobile-keys-container button:hover {
    background-color: var(--bg-hover) !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Compact adjustments for 100vh viewport */
#utilities .card, #retro-game .card {
    padding: 1.25rem;
}

#utilities .tools-grid {
    gap: 0.75rem;
}

.tool-card {
    gap: 6px;
}

.tool-result {
    padding: 0.75rem;
    margin: 4px 0;
    min-height: 50px;
}

.rolled-number {
    font-size: 1.5rem;
}

.quote-display-card {
    padding: 0.85rem;
    margin-bottom: 0.5rem;
    min-height: 60px;
}

.quote-text {
    font-size: 0.95rem;
}

/* AI Keypress Simulation Highlight */
.btn-ai-highlight {
    background-color: var(--color-accent) !important;
    color: white !important;
    border-color: var(--color-accent) !important;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 175, 102, 0.4);
    transition: all 0.08s ease-in-out;
}

/* ==========================================================================
   POSTS MANAGER
   ========================================================================== */
.posts-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 140px); /* Fit within viewport */
    overflow: hidden;
}

.posts-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem;
    overflow-y: auto;
}

.posts-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.folder-tree-list {
    flex-grow: 1;
    overflow-y: auto;
}

/* Tree view styling */
.tree-folder {
    margin-bottom: 0.5rem;
}

.tree-folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tree-folder-header:hover {
    background-color: var(--bg-hover);
}

.tree-folder-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.tree-folder-title i {
    color: var(--color-accent);
}

.tree-folder-actions, .tree-post-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.tree-folder-header:hover .tree-folder-actions,
.tree-post-item:hover .tree-post-actions {
    opacity: 1;
}

.tree-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.tree-btn:hover {
    color: var(--color-accent);
    background-color: rgba(0,0,0,0.05);
}

.tree-btn.btn-delete:hover {
    color: var(--color-rose);
}

.tree-posts-container {
    padding-left: 1.5rem;
    margin-top: 2px;
    border-left: 1px dashed var(--border-color);
}

.tree-post-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.tree-post-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.tree-post-item.active {
    background-color: var(--color-accent-light);
    color: var(--color-accent-hover);
    font-weight: 500;
}

.tree-post-title {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-post-title i {
    color: var(--text-muted);
}

.tree-post-item.active .tree-post-title i {
    color: var(--color-accent);
}

/* Editor workspace */
.posts-editor-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    overflow: hidden;
}

.editor-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.editor-empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--border-color);
}

.editor-empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.editor-active-state {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.editor-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.post-title-container {
    flex-grow: 1;
    min-width: 250px;
}

.post-title-input {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 5px 0;
    background: transparent;
    width: 100%;
}

.post-title-input:focus {
    outline: none;
    border-bottom-color: var(--color-accent);
}

.post-meta-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.form-group-inline select {
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

/* Editor tabs */
.editor-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-top: 0.75rem;
}

.editor-tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.editor-tab-btn:hover {
    color: var(--text-primary);
}

.editor-tab-btn.active {
    color: var(--color-accent-hover);
    border-bottom-color: var(--color-accent);
}

/* Editor body & Panes */
.editor-body {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
}

.editor-body .pane {
    display: none;
    height: 100%;
    width: 100%;
}

.editor-body .pane.active {
    display: flex;
    flex-direction: column;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background-color: var(--bg-hover);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.toolbar-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.toolbar-btn:hover {
    background-color: var(--color-accent-light);
    color: var(--color-accent-hover);
    border-color: var(--color-accent);
}

.toolbar-divider {
    width: 1px;
    height: 16px;
    background-color: var(--border-color);
    margin: 0 4px;
}

.post-content-textarea {
    flex-grow: 1;
    width: 100%;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    border: 1px solid var(--border-color);
    padding: 1rem;
    font-family: monospace;
    font-size: 0.95rem;
    resize: none;
    line-height: 1.6;
}

.post-content-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Markdown preview pane */
#preview-pane {
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    background-color: var(--bg-main);
    flex-grow: 1;
}

/* Custom Markdown Rendering Styles for Warm Minimalist */
.markdown-body {
    color: var(--text-primary);
    line-height: 1.6;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    font-family: var(--font-heading);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.markdown-body h1 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.markdown-body h2 {
    font-size: 1.4rem;
}

.markdown-body h3 {
    font-size: 1.15rem;
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-body li {
    margin-bottom: 0.25rem;
}

.markdown-body img {
    max-width: 100%;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 4px;
    background: #fff;
    margin: 1rem 0;
}

.markdown-body code {
    font-family: monospace;
    background-color: var(--bg-hover);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.9em;
}

.markdown-body pre {
    background-color: #2b2b2b;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-body pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: 0.9em;
}

.markdown-body blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

/* ==========================================================================
   GACHA 777 (SLOT MACHINE)
   ========================================================================== */
.gacha-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .gacha-layout {
        grid-template-columns: 1fr;
    }
    .gacha-history-container {
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px solid var(--border-color);
        padding-top: 1.5rem;
    }
}

.gacha-machine-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.gacha-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    .gacha-dashboard {
        grid-template-columns: 1fr;
    }
}

.gacha-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.gacha-stat-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.gacha-stat-val {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 800;
}

.gacha-stat-val small {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.gacha-bet-control {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.gacha-bet-control input {
    width: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1px 2px;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 700;
    height: 24px;
}

.gacha-bet-control input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.bet-btn-sm {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.bet-btn-sm:hover {
    background: var(--color-accent-light);
    color: var(--color-accent-hover);
    border-color: var(--color-accent);
}

.bet-quick-actions {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}

.bet-btn-xs {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.62rem;
    padding: 0px 4px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    height: 16px;
    line-height: 14px;
}

.bet-btn-xs:hover {
    border-color: var(--color-accent);
    color: var(--color-accent-hover);
    background: var(--color-accent-light);
}

.gacha-slots-input-wrapper input {
    width: 55px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1px 3px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    margin-top: 1px;
    height: 24px;
}

.gacha-stat-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* LED Header Banner */
.gacha-led-banner {
    background: #251d1c;
    border: 3px solid #3d3231;
    border-radius: var(--border-radius-sm);
    padding: 4px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffd700; /* Gold */
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    animation: ledTextGlow 1s infinite alternate;
}

@keyframes ledTextGlow {
    0% { text-shadow: 0 0 3px #ffd700; color: #ffd700; }
    100% { text-shadow: 0 0 8px #f59e0b, 0 0 15px #f59e0b; color: #fff; }
}

.led-dot {
    width: 5px;
    height: 5px;
    background: #ef4444; /* Red light */
    border-radius: 50%;
    animation: blinkLed 0.5s infinite alternate;
}

.led-dot:last-child {
    animation-delay: 0.25s;
}

@keyframes blinkLed {
    0% { opacity: 0.3; box-shadow: none; }
    100% { opacity: 1; box-shadow: 0 0 4px #ef4444; }
}

.gacha-reels-wrapper {
    display: flex;
    gap: 15px;
    background: #4a3e3d; /* Dark wood-like frame */
    padding: 24px 30px;
    border-radius: var(--border-radius-lg);
    border: 6px solid #a6632a; /* Terracotta outer rim */
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.5), 0 6px 15px rgba(0,0,0,0.15);
    margin: 15px 0;
    justify-content: safe center;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
}

/* Custom Gacha Wood-style Scrollbar */
.gacha-reels-wrapper::-webkit-scrollbar {
    height: 8px;
}
.gacha-reels-wrapper::-webkit-scrollbar-track {
    background: #332a29;
    border-radius: 4px;
}
.gacha-reels-wrapper::-webkit-scrollbar-thumb {
    background: #a6632a;
    border-radius: 4px;
}
.gacha-reels-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

.gacha-reel {
    flex: 0 0 75px; /* Prevent shrink when slots are massive */
    width: 75px;
    height: 110px;
    background: #ffffff;
    border-radius: var(--border-radius-sm);
    border: 2px solid #332a29;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-family: 'Outfit', sans-serif;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.gacha-reel.spinning {
    animation: reelBlur 0.08s infinite linear;
}

@keyframes reelBlur {
    0% { transform: translateY(-3px); filter: blur(0.5px); }
    50% { transform: translateY(3px); filter: blur(1.5px); }
    100% { transform: translateY(-3px); filter: blur(0.5px); }
}

.gacha-history-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 1px solid var(--border-color);
    padding-left: 1.5rem;
    height: 350px;
}

.gacha-history-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 5px;
}

.gacha-history-item {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
    display: grid;
    grid-template-columns: 1fr 130px;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.gacha-history-item:hover {
    transform: translateX(2px);
}

.gacha-history-result {
    font-family: monospace;
    font-weight: bold;
    letter-spacing: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gacha-history-reward {
    font-weight: bold;
    text-align: right;
    white-space: nowrap;
}

.gacha-reward-win {
    color: var(--color-green);
}

.gacha-reward-jackpot {
    color: var(--color-accent);
    text-shadow: 0 0 4px rgba(192, 122, 60, 0.2);
}

.gacha-reward-loss {
    color: var(--text-muted);
}

/* LED Border Glow Effect */
.gacha-reels-wrapper.jackpot-glow {
    animation: gachaBorderGlow 0.15s infinite alternate;
}

@keyframes gachaBorderGlow {
    0% { border-color: #a6632a; box-shadow: 0 0 10px #d97706; }
    50% { border-color: #e28743; box-shadow: 0 0 20px #f59e0b, inset 0 0 15px #f59e0b; }
    100% { border-color: #f59e0b; box-shadow: 0 0 35px #f59e0b, inset 0 0 25px #d97706; }
}

/* Coin Rain Falling Animation */
.gacha-coin-rain {
    position: absolute;
    font-size: 1.5rem;
    pointer-events: none;
    animation: coinFallAnimation 1.5s linear forwards;
    z-index: 999;
}

@keyframes coinFallAnimation {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(350px) rotate(360deg); opacity: 0; }
}

/* Mini Emoji Badges in History */
.history-emoji-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-right: 2px;
}

.gacha-badge-status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-right: 6px;
    display: inline-block;
}

.status-jackpot {
    background-color: var(--color-accent-light);
    color: var(--color-accent-hover);
    border: 1px solid var(--color-accent);
}

.status-win {
    background-color: var(--color-green-light);
    color: var(--color-green);
    border: 1px solid rgba(55, 111, 78, 0.3);
}

.status-refund {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.status-loss {
    background-color: #fdf2f2;
    color: var(--color-rose);
    border: 1px solid rgba(169, 68, 66, 0.2);
}

