/* ═══════════════════════════════════════════════════════════════════════════
   ARKNIGHTS RECRUITMENT TOOL - COMPILED TAILWIND CSS
   Pre-compiled for maximum performance (Zero-runtime overhead)
   ═══════════════════════════════════════════════════════════════════════════ */

*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

body {
    margin: 0;
    line-height: inherit;
    background-color: #121212;
    color: #e5e7eb;
}

h1,
h2,
h3,
h4 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
}

button,
input {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
    padding: 0;
}

button {
    cursor: pointer;
    background-color: transparent;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.w-full {
    width: 100%;
}

.max-w-7xl {
    max-width: 80rem;
}

.max-w-5xl {
    max-width: 64rem;
}

.min-h-screen {
    min-height: 100vh;
}

.text-center {
    text-align: center;
}

.text-white {
    color: #fff;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-900 {
    color: #111827;
}

.bg-gray-800 {
    background-color: #1f2937;
}

.bg-gray-900 {
    background-color: #111827;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-red-600 {
    background-color: #dc2626;
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:bg-gray-700:hover {
    background-color: #374151;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.border {
    border-width: 1px;
}

.border-gray-700 {
    border-color: #374151;
}

.font-bold {
    font-weight: 700;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.uppercase {
    text-transform: uppercase;
}

.cursor-pointer {
    cursor: pointer;
}

.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Custom Arknights Styles */
.ak-card {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid #444;
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.tag-btn {
    background: #333;
    color: #ddd;
    border: 1px solid #555;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.tag-btn:hover {
    background: #444;
    border-color: #888;
}

.tag-btn.active {
    background: #0099FF;
    color: white;
    border-color: #00CCFF;
    box-shadow: 0 0 10px rgba(0, 153, 255, 0.5);
}

.tag-btn.guarantee-6 {
    border-color: #FFD700;
    color: #FFD700;
}

.tag-btn.guarantee-5 {
    border-color: #00BFFF;
    color: #00BFFF;
}

.op-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #333;
}

.op-card:last-child {
    border-bottom: none;
}

/* Operator Avatar */
.op-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #555;
    background: #222;
    flex-shrink: 0;
}

.op-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #1f2937;
    border: 2px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Class Icons */
.class-icon {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    object-fit: contain;
    filter: brightness(0.9);
    flex-shrink: 0;
}

.op-rarity-6 {
    color: #FFD700;
}

.op-rarity-5 {
    color: #FEFEFE;
}

/* Actually 5 is usually yellowish white or distinct, generic for now */
.op-rarity-4 {
    color: #D8BFD8;
}

.op-rarity-3 {
    color: #87CEEB;
}

.op-rarity-2 {
    color: #FFFFE0;
}

.op-rarity-1 {
    color: #FFFFFF;
}

.rarity-bg-6 {
    background: linear-gradient(45deg, #FF8C00, #FFD700);
    color: black;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.7rem;
}

.rarity-bg-5 {
    background: linear-gradient(45deg, #FFD700, #FFFFE0);
    color: black;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.7rem;
}

.rarity-bg-4 {
    background: #9932CC;
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.7rem;
}

.rarity-bg-3 {
    background: #1E90FF;
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
    font-size: 0.7rem;
}

/* Grid Layouts */
.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .md\:flex-row {
        flex-direction: row;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mobile-First Base Styles */
.tag-btn {
    min-height: 44px;
    /* Touch-friendly */
    padding: 0.625rem 0.75rem;
    font-size: 0.7rem;
}

/* Results grid - Mobile first (1 column) */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn {
    background: rgba(50, 50, 50, 0.9);
    border: 1px solid #555;
    color: #ddd;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: #444;
    border-color: #888;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(30, 30, 30, 0.98);
    border: 1px solid #555;
    border-radius: 4px;
    margin-top: 4px;
    z-index: 100;
    min-width: 120px;
    display: none;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    color: #ddd;
    cursor: pointer;
    font-size: 0.85rem;
}

.lang-option:hover {
    background: #333;
}

.lang-option.active {
    background: #0099FF;
    color: white;
}

/* Operator card mobile layout */
.op-card {
    padding: 8px;
    gap: 8px;
}

.op-avatar {
    width: 36px;
    height: 36px;
}

.op-avatar-fallback {
    width: 36px;
    height: 36px;
    font-size: 0.65rem;
}

/* Small phones (320px - 374px) */
@media (max-width: 374px) {
    .tag-btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.65rem;
    }

    .op-card {
        padding: 6px;
        gap: 6px;
    }

    .op-avatar,
    .op-avatar-fallback {
        width: 32px;
        height: 32px;
    }

    .text-4xl {
        font-size: 1.5rem;
    }

    .text-2xl {
        font-size: 1.125rem;
    }
}

/* Standard phones (375px - 639px) */
@media (min-width: 375px) and (max-width: 639px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (640px - 1023px) */
@media (min-width: 640px) {
    .tag-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .op-avatar,
    .op-avatar-fallback {
        width: 40px;
        height: 40px;
    }

    .op-card {
        padding: 10px;
        gap: 10px;
    }
}

/* Large tablets / Small desktops (1024px+) */
@media (min-width: 1024px) {
    .results-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large desktops (1280px+) */
@media (min-width: 1280px) {
    .results-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .xl\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEO CONTENT SECTIONS & VISUAL POLISH
   ═══════════════════════════════════════════════════════════════════════════ */

.seo-section {
    margin-bottom: 2.5rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
    /* rounded-xl */
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-panel:hover {
    border-color: rgba(0, 153, 255, 0.3);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

/* Typography Enhancements */
.text-gradient-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #00BFFF 0%, #0077FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Prose Override */
.prose {
    line-height: 1.8;
}

.prose p {
    margin-bottom: 1.25rem;
    color: #d1d5db;
    /* gray-300 */
}

.prose strong {
    color: #fff;
    font-weight: 600;
}

.prose ul {
    list-style-type: none;
    padding-left: 0;
}

.prose li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0099FF;
    font-weight: bold;
}

/* Step Cards */
.step-card {
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #444;
    transition: background 0.3s;
}

.step-card:hover::before {
    background: #0099FF;
}

.step-card.gold-accent:hover::before {
    background: #FFD700;
}

/* Table Enhancements */
.ak-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid #374151;
}

.ak-table th {
    background: #1f2937;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 1px solid #374151;
    text-align: left;
}

.ak-table td {
    padding: 1rem;
    border-bottom: 1px solid #374151;
    background: rgba(31, 41, 55, 0.5);
    color: #e5e7eb;
}

.ak-table tr:last-child td {
    border-bottom: none;
}

.ak-table tr:hover td {
    background: rgba(55, 65, 81, 0.8);
}