.card{background:var(--surface);border-radius:16px;box-shadow:0 4px 16px var(--shadow);padding:16px;display:flex;flex-direction:column;gap:10px;border-top:5px solid var(--accent);transition:transform .15s ease,box-shadow .15s ease;cursor:pointer;-webkit-user-select:none;user-select:none}.card:hover{transform:translateY(-4px);box-shadow:0 8px 24px var(--shadow-hover)}.card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.card-header{display:flex;justify-content:space-between;align-items:center}.card-id{font-size:.78rem;color:var(--text-faint);font-weight:600}.card-types{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}.type-badge{color:#fff;font-size:.68rem;font-weight:700;padding:2px 8px;border-radius:20px;text-transform:capitalize;letter-spacing:.03em}.card-image-wrap{display:flex;justify-content:center}.card-image{width:120px;height:120px;object-fit:contain}.card-image-placeholder{width:120px;height:120px;display:flex;align-items:center;justify-content:center;font-size:2rem;color:var(--text-faint);background:var(--bg);border-radius:50%}.card-name{text-align:center;font-size:1rem;font-weight:700;text-transform:capitalize;color:var(--text-primary);margin:0}.card-stats{display:flex;flex-direction:column;gap:5px}.stat-row{display:grid;grid-template-columns:32px 1fr 28px;align-items:center;gap:6px}.stat-label{font-size:.65rem;font-weight:700;color:var(--text-muted);text-transform:uppercase}.stat-bar-bg{height:6px;background:var(--stat-bar-bg);border-radius:4px;overflow:hidden}.stat-bar-fill{height:100%;background:var(--accent);border-radius:4px}.stat-value{font-size:.7rem;font-weight:600;color:var(--text-secondary);text-align:right}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--overlay);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fade-in .15s ease}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.modal{background:var(--surface);border-radius:20px;width:100%;max-width:540px;max-height:90vh;overflow-y:auto;position:relative;box-shadow:0 24px 64px #0000004d;animation:slide-up .2s ease;scrollbar-width:thin;scrollbar-color:var(--border) transparent}@keyframes slide-up{0%{transform:translateY(24px);opacity:0}to{transform:translateY(0);opacity:1}}.modal-close{position:absolute;top:12px;right:14px;background:none;border:none;font-size:1.8rem;line-height:1;color:var(--text-muted);cursor:pointer;z-index:10;padding:2px 6px;border-radius:6px;transition:color .1s}.modal-close:hover{color:var(--text-primary)}.modal-hero{display:flex;align-items:center;gap:20px;padding:28px 24px 20px;border-radius:20px 20px 0 0}.modal-image{width:140px;height:140px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 4px 12px rgba(0,0,0,.2))}.modal-image-placeholder{width:140px;height:140px;display:flex;align-items:center;justify-content:center;font-size:3rem;color:var(--text-faint);flex-shrink:0}.modal-identity{display:flex;flex-direction:column;gap:6px}.modal-id{font-size:.75rem;color:var(--text-faint);font-weight:600;letter-spacing:.05em}.modal-name{font-size:1.6rem;font-weight:800;text-transform:capitalize;color:var(--text-primary);line-height:1.1}.modal-genus{font-size:.82rem;color:var(--text-muted);font-style:italic}.modal-types{display:flex;gap:6px;flex-wrap:wrap}.type-badge{color:#fff;font-size:.72rem;font-weight:700;padding:3px 10px;border-radius:20px;text-transform:capitalize;letter-spacing:.04em}.modal-badge{display:inline-block;font-size:.7rem;font-weight:700;padding:2px 8px;border-radius:12px;text-transform:uppercase;letter-spacing:.06em;width:fit-content}.modal-badge.legendary{background:linear-gradient(135deg,#d69e2e,#f6ad55);color:#fff}.modal-badge.mythical{background:linear-gradient(135deg,#805ad5,#b794f4);color:#fff}.modal-body{padding:16px 24px 28px;display:flex;flex-direction:column;gap:20px}.modal-loading{color:var(--text-muted);font-size:.85rem;text-align:center}.modal-description{font-size:.88rem;line-height:1.6;color:var(--text-secondary);background:var(--bg);border-radius:10px;padding:12px 14px}.modal-meta{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}.meta-item{background:var(--bg);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:3px}.meta-label{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}.meta-value{font-size:.95rem;font-weight:600;color:var(--text-primary)}.capitalize{text-transform:capitalize}.modal-section{display:flex;flex-direction:column;gap:10px}.modal-section-title{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted)}.abilities-list{display:flex;flex-wrap:wrap;gap:8px}.ability-tag{background:var(--bg);border:1.5px solid var(--border);border-radius:8px;padding:4px 12px;font-size:.82rem;font-weight:600;color:var(--text-primary);text-transform:capitalize}.ability-tag.hidden{border-style:dashed;color:var(--text-muted)}.ability-tag em{font-weight:400;font-size:.75rem;margin-left:2px}.modal-stats{display:flex;flex-direction:column;gap:8px}.modal-stat-row{display:grid;grid-template-columns:68px 38px 1fr;align-items:center;gap:10px}.modal-stat-label{font-size:.75rem;font-weight:700;color:var(--text-muted)}.modal-stat-value{font-size:.82rem;font-weight:700;color:var(--text-primary);text-align:right}.modal-stat-bar-bg{height:8px;background:var(--stat-bar-bg);border-radius:6px;overflow:hidden}.modal-stat-bar-fill{height:100%;background:var(--accent);border-radius:6px;transition:width .5s ease}.total-row .modal-stat-label,.total-row .modal-stat-value{color:var(--text-primary);font-size:.82rem}.search-wrap{position:relative;width:100%;max-width:480px}.search-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--text-muted);pointer-events:none}.search-input{width:100%;padding:10px 36px 10px 38px;border:1.5px solid var(--border);border-radius:10px;background:var(--input-bg);color:var(--text-primary);font-size:.9rem;outline:none;transition:border-color .15s;-webkit-appearance:none;-moz-appearance:none;appearance:none}.search-input:focus{border-color:#e53e3e}.search-input::placeholder{color:var(--text-faint)}.search-input::-webkit-search-cancel-button{display:none}.search-clear{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:none;border:none;font-size:1.2rem;line-height:1;color:var(--text-muted);cursor:pointer;padding:2px 4px;border-radius:4px}.search-clear:hover{color:var(--text-primary)}.type-filter-wrap{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}.type-filter{display:flex;flex-wrap:wrap;gap:6px}.type-btn{padding:4px 12px;border-radius:20px;border:1.5px solid;background:transparent;font-size:.72rem;font-weight:700;text-transform:capitalize;letter-spacing:.04em;cursor:pointer;transition:background .12s,color .12s,transform .1s;line-height:1.5}.type-btn:hover{filter:brightness(1.1);transform:translateY(-1px)}.type-btn.selected{box-shadow:0 2px 8px #0003}.type-filter-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.type-filter-logic{font-size:.75rem;color:var(--text-muted);font-style:italic}.type-filter-clear{background:none;border:1px solid var(--border);border-radius:8px;padding:3px 10px;font-size:.75rem;color:var(--text-muted);cursor:pointer;transition:color .1s,border-color .1s}.type-filter-clear:hover{color:var(--text-primary);border-color:var(--text-muted)}.lang-selector{flex-shrink:0}.lang-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--surface);border:1.5px solid var(--border);border-radius:10px;color:var(--text-primary);cursor:pointer;font-size:.82rem;font-family:inherit;height:40px;padding:0 10px;transition:border-color .15s;min-width:0}.lang-select:hover{border-color:var(--text-muted)}.lang-select:focus{outline:none;border-color:#e53e3e}:root{color-scheme:light;--bg: #f0f4f8;--surface: #ffffff;--text-primary: #222222;--text-secondary: #555555;--text-muted: #888888;--text-faint: #aaaaaa;--border: #e2e8f0;--shadow: rgba(0, 0, 0, .08);--shadow-hover: rgba(0, 0, 0, .14);--error-bg: #fff5f5;--error-border: #fed7d7;--error-text: #c53030;--spinner-border: #e2e8f0;--stat-bar-bg: #eeeeee;--overlay: rgba(0, 0, 0, .55);--input-bg: #ffffff}[data-theme=dark]{color-scheme:dark;--bg: #1a202c;--surface: #2d3748;--text-primary: #f7fafc;--text-secondary: #e2e8f0;--text-muted: #a0aec0;--text-faint: #718096;--border: #4a5568;--shadow: rgba(0, 0, 0, .35);--shadow-hover: rgba(0, 0, 0, .55);--error-bg: #742a2a;--error-border: #9b2c2c;--error-text: #feb2b2;--spinner-border: #4a5568;--stat-bar-bg: #4a5568;--overlay: rgba(0, 0, 0, .75);--input-bg: #2d3748}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{font-family:Segoe UI,system-ui,-apple-system,sans-serif;background:var(--bg);color:var(--text-primary);min-height:100vh;transition:background .2s,color .2s}.app{max-width:1200px;margin:0 auto;padding:0 16px 60px}.app-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 0 18px;border-bottom:2px solid var(--border);margin-bottom:24px;flex-wrap:wrap}.header-left{display:flex;align-items:center;gap:10px;flex-shrink:0}.header-right{display:flex;align-items:center;gap:10px;flex:1;justify-content:flex-end;min-width:0}.header-logo{width:34px;height:34px}.app-header h1{font-size:1.8rem;font-weight:800;background:linear-gradient(135deg,#e53e3e,#d69e2e);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;white-space:nowrap}.dark-toggle{flex-shrink:0;background:var(--surface);border:1.5px solid var(--border);border-radius:10px;width:40px;height:40px;font-size:1.1rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s,border-color .15s}.dark-toggle:hover{border-color:var(--text-muted)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:20px}.sentinel{height:1px}.spinner-wrap{display:flex;flex-direction:column;align-items:center;gap:12px;padding:40px 0;color:var(--text-muted);font-size:.9rem}.spinner{width:40px;height:40px;border:4px solid var(--spinner-border);border-top-color:#e53e3e;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.end-message{text-align:center;padding:40px 0 20px;color:var(--text-muted);font-size:.9rem}.no-results{text-align:center;padding:60px 0;color:var(--text-muted);font-size:1rem}.error-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--error-bg);border:1px solid var(--error-border);border-radius:8px;padding:12px 16px;margin-bottom:24px;color:var(--error-text);font-size:.9rem}.error-banner button{background:#e53e3e;color:#fff;border:none;border-radius:6px;padding:6px 14px;font-size:.85rem;cursor:pointer;white-space:nowrap}.error-banner button:hover{background:#c53030}
