/* ============================================
   i18n Checker — Styles
   Theme: Midnight Aurora
   Primary: #6C5CE7, Accent: #FD79A8, BG: #0D0B1E
   ============================================ */

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --bg: #0D0B1E;
    --bg-card: #14112A;
    --bg-input: #0D0B1E;
    --bg-hover: #1E1A3A;

    --border: rgba(108, 92, 231, 0.12);
    --border-hover: rgba(108, 92, 231, 0.28);
    --border-focus: #6C5CE7;

    --text: #E8E6F0;
    --text-secondary: #A29BFE;
    --text-muted: #5A5580;

    --primary: #6C5CE7;
    --primary-glow: rgba(108, 92, 231, 0.2);
    --secondary: #A29BFE;
    --accent: #FD79A8;
    --accent-glow: rgba(253, 121, 168, 0.15);
    --green: #55EFC4;
    --yellow: #FFEAA7;
    --red: #FF7675;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

.app {
    max-width: 780px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.header-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 0 20px var(--primary-glow);
}

.header-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-sub {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.35s ease-out;
}

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

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.card-header .card-title {
    margin-bottom: 0;
}

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

.btn-sm {
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

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

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.code-area {
    width: 100%;
    min-height: 200px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    resize: vertical;
    line-height: 1.6;
    tab-size: 2;
    transition: border-color var(--transition);
}

.code-area:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.code-area::placeholder {
    color: var(--text-muted);
}

.input-actions {
    margin-top: 10px;
}

.filter-select {
    padding: 5px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
}

.filter-select option {
    background: var(--bg-card);
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.summary-item {
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.summary-count {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.summary-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-item.warn .summary-count {
    color: var(--yellow);
}

.summary-item.error .summary-count {
    color: var(--red);
}

.summary-item.good .summary-count {
    color: var(--green);
}

/* Issues */
.issue-item {
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all var(--transition);
}

.issue-item:hover {
    border-color: var(--border-hover);
}

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

.issue-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.type-string {
    background: rgba(253, 121, 168, 0.15);
    color: var(--accent);
}

.type-date {
    background: rgba(255, 234, 167, 0.15);
    color: var(--yellow);
}

.type-number {
    background: rgba(0, 184, 148, 0.15);
    color: var(--green);
}

.type-rtl {
    background: rgba(108, 92, 231, 0.15);
    color: var(--primary);
}

.type-unicode {
    background: rgba(162, 155, 254, 0.15);
    color: var(--secondary);
}

.type-plural {
    background: rgba(255, 118, 117, 0.15);
    color: var(--red);
}

.issue-severity {
    font-size: 0.72rem;
}

.severity-high {
    color: var(--red);
}

.severity-medium {
    color: var(--yellow);
}

.severity-low {
    color: var(--text-muted);
}

.issue-msg {
    font-size: 0.82rem;
    color: var(--text);
    margin-bottom: 4px;
}

.issue-line {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.issue-code {
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent);
    overflow-x: auto;
    white-space: pre;
}

.hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Expansion Table */
.expansion-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 0.82rem;
}

.expansion-lang {
    font-weight: 600;
}

.expansion-pct {
    font-family: var(--font-mono);
    color: var(--accent);
}

.footer {
    text-align: center;
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-card);
    border: 1px solid var(--green);
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 0.82rem;
    color: var(--green);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@media (max-width: 520px) {
    .app {
        padding: 16px 10px 32px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}