/**
 * PromptMaster - Main Stylesheet
 * Higgsfield.ai inspired dark theme with glassmorphism
 */

/* ===== CSS Variables ===== */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
    --accent-glow: rgba(99, 102, 241, 0.4);

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Sizing */
    --header-height: 72px;
    --sidebar-width: 280px;
    --max-content-width: 1400px;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-tooltip: 500;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f8;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.02);
    --bg-glass-hover: rgba(0, 0, 0, 0.05);

    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.7);
    --text-tertiary: rgba(26, 26, 46, 0.5);
    --text-muted: rgba(26, 26, 46, 0.3);

    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.15);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background gradient effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-top: var(--header-height);
    padding-bottom: 60px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: var(--z-sticky);
    transition: background var(--transition-normal);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.8);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm), 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow);
}

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

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

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

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--border-radius-md);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-md);
}

.card-glass {
    background: var(--bg-glass);
}

.card-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ===== AI Tool Cards ===== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.tool-card {
    position: relative;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--tool-color, var(--accent-gradient));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tool-card:hover::before,
.tool-card.selected::before {
    opacity: 1;
}

.tool-card.selected {
    border-color: var(--tool-color, var(--accent-primary));
    background: rgba(99, 102, 241, 0.05);
}

.tool-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
}

.tool-name {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.tool-type {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.7;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

/* ===== Prompt Area ===== */
.prompt-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (max-width: 992px) {
    .prompt-section {
        grid-template-columns: 1fr;
    }
}

.prompt-box {
    position: relative;
}

.prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.prompt-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.prompt-actions {
    display: flex;
    gap: 8px;
}

.prompt-output {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 18px;
    min-height: 200px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.prompt-output.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* ===== Character Counter ===== */
.char-counter {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.char-counter-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.char-counter-value {
    font-weight: 600;
    color: var(--text-secondary);
}

.char-counter-limit {
    color: var(--accent-primary);
}

/* ===== Parameters Panel ===== */
.parameters-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-top: 24px;
}

.parameters-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parameters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

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

.parameter-label {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.parameter-select {
    padding: 10px 14px;
    font-size: 0.875rem;
}

/* ===== Copy History Sidebar ===== */
.copy-sidebar {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: var(--z-dropdown);
    overflow-y: auto;
}

.copy-sidebar.open {
    transform: translateX(0);
}

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

.copy-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
}

.copy-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.copy-item:hover {
    background: var(--bg-glass-hover);
}

.copy-item-tool {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.copy-item-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 380px;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--info);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
}

.toast-close {
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* ===== Loading Spinner ===== */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    z-index: 10;
}

/* ===== Toggle Switch ===== */
.toggle {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 4px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

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

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

/* ===== Theme Toggle ===== */
.theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--bg-glass-hover);
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--border-radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-toggle-btn:hover {
    background: var(--bg-glass-hover);
}

.theme-toggle-icon {
    font-size: 1.1rem;
}

.theme-label {
    white-space: nowrap;
}

/* ===== Language Selector ===== */
.lang-select {
    padding: 8px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

/* ===== Mobile Menu Button ===== */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
}

/* ===== Footer ===== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-text {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.footer-heart {
    color: var(--error);
}

/* ===== Responsive ===== */

/* Prevent horizontal scroll on mobile */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

@media (max-width: 1024px) {
    .prompt-section {
        grid-template-columns: 1fr;
    }

    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 16px;
    }

    .nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
        flex-direction: column;
        gap: 8px;
        z-index: var(--z-dropdown);
    }

    .nav.open {
        display: flex;
    }

    .nav-link {
        padding: 14px 16px;
        width: 100%;
        text-align: left;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tool-card {
        padding: 14px 10px;
    }

    .tool-icon {
        width: 44px;
        height: 44px;
    }

    .tool-name {
        font-size: 0.8125rem;
    }

    .prompt-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .parameters-grid {
        grid-template-columns: 1fr 1fr;
    }

    .btn {
        padding: 12px 18px;
        font-size: 0.875rem;
    }

    .header-actions {
        gap: 8px;
    }

    .lang-select {
        padding: 6px 10px;
        font-size: 0.8125rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .char-counter {
        flex-wrap: wrap;
        gap: 12px;
    }

    .form-textarea {
        min-height: 160px;
    }

    .prompt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .prompt-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .copy-sidebar {
        width: 100%;
    }

    /* Prompt language toggle for mobile */
    .prompt-lang-toggle {
        flex-wrap: wrap;
    }

    .main-content {
        padding-top: var(--header-height);
        padding-bottom: 40px;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 56px;
    }

    h1 {
        font-size: 1.25rem;
    }

    .logo span {
        display: none;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .tool-card {
        padding: 12px 8px;
    }

    .tool-icon {
        width: 40px;
        height: 40px;
    }

    .tool-name {
        font-size: 0.75rem;
    }

    .tool-type {
        font-size: 0.625rem;
    }

    .parameters-grid {
        grid-template-columns: 1fr;
    }

    .header-actions {
        gap: 6px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .toast {
        max-width: 100%;
        padding: 12px 16px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 0.8125rem;
    }

    .flex.gap-3 {
        gap: 8px;
        flex-wrap: wrap;
    }

    .flex.gap-3 .btn {
        flex: 1;
        min-width: 80px;
    }
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.rounded {
    border-radius: var(--border-radius-md);
}

.rounded-lg {
    border-radius: var(--border-radius-lg);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.pointer-events-none {
    pointer-events: none;
}

.cursor-pointer {
    cursor: pointer;
}

/* ===== Animations ===== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

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

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== Quality Badge ===== */
.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: help;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.quality-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.quality-badge__icon {
    display: flex;
    align-items: center;
}

.quality-badge__label {
    opacity: 0.9;
}

/* Grade color variants */
.quality-badge--excellent {
    background: #10b981;
}

.quality-badge--good {
    background: #3b82f6;
}

.quality-badge--average {
    background: #f59e0b;
}

.quality-badge--basic {
    background: #6b7280;
}