/* scryban — Minimalist Design */

:root {
    --bg: #0d0d0d;
    --bg-elevated: #161616;
    --bg-subtle: #1a1a1a;
    --border: #2a2a2a;
    --border-hover: #3a3a3a;
    --text: #fafafa;
    --text-muted: #888;
    --text-subtle: #555;
    --accent: #d4a853;
    --accent-hover: #e5bc6a;
    --banned: #e5484d;
    --banned-bg: rgba(229, 72, 77, 0.08);
    --restricted: #f5a623;
    --restricted-bg: rgba(245, 166, 35, 0.08);
    --legal: #30a46c;
    --legal-bg: rgba(48, 164, 108, 0.08);
    --not-legal: #555;
    --not-legal-bg: rgba(85, 85, 85, 0.06);
    --points: #8b5cf6;
    --points-bg: rgba(139, 92, 246, 0.08);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --transition: 0.2s 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;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* Header */
.header {
    padding: 1.5rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity var(--transition);
}

.logo:hover {
    opacity: 0.7;
}

/* Main */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

/* Search Container */
.search-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    padding: 4rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container.compact {
    flex: 0;
    padding: 6rem 0 2rem;
    justify-content: flex-start;
}

/* Search Form */
.search-form {
    width: 100%;
    display: flex;
    gap: 0.75rem;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 56px;
    padding: 0 1rem 0 3rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: all var(--transition);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:hover {
    border-color: var(--border-hover);
}

.search-input:focus {
    border-color: var(--accent);
    background: var(--bg-subtle);
}

/* Search Button */
.search-btn {
    height: 56px;
    padding: 0 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--bg);
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.search-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.search-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text,
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-loader.hidden,
.btn-text.hidden {
    display: none;
}

.spinner-icon {
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

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

/* Hint */
.hint {
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-subtle);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container.compact .hint {
    opacity: 0;
    height: 0;
    margin-top: 0;
}

/* Autocomplete */
.autocomplete {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.autocomplete.hidden {
    display: none;
}

.autocomplete-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--bg-subtle);
}

/* Results */
.results {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

.results.hidden {
    display: none;
}

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

/* Results Layout - Side by Side */
.results-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Card Aside */
.card-aside {
    position: sticky;
    top: 6rem;
}

.card-aside.hidden {
    display: none;
}

.card-image {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.card-image:hover {
    transform: scale(1.03) rotate(1deg);
}

/* Card Lightbox */
.lightbox .lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalIn 0.2s ease-out;
}

.lightbox-image {
    max-width: min(90vw, 480px);
    max-height: 85vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox .modal-close {
    position: absolute;
    top: -2.5rem;
    right: -0.5rem;
    width: 40px;
    height: 40px;
    font-size: 1.75rem;
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
}

.lightbox .modal-close:hover {
    background: var(--bg-subtle);
    border-color: var(--border-hover);
}

/* Error */
.error {
    padding: 1rem 1.25rem;
    background: var(--banned-bg);
    border: 1px solid rgba(229, 72, 77, 0.2);
    border-radius: var(--radius);
    color: var(--banned);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.error.hidden {
    display: none;
}

/* Format Grid */
.format-grid {
    display: grid;
    gap: 1rem;
}

.format-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    animation: slideUp 0.4s ease-out backwards;
}

.format-section:nth-child(1) { animation-delay: 0.05s; }
.format-section:nth-child(2) { animation-delay: 0.1s; }
.format-section:nth-child(3) { animation-delay: 0.15s; }
.format-section:nth-child(4) { animation-delay: 0.2s; }
.format-section:nth-child(5) { animation-delay: 0.25s; }

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

.format-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.875rem;
}

.format-section h3::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Banned */
.format-section.banned {
    background: var(--banned-bg);
    border-color: rgba(229, 72, 77, 0.15);
}

.format-section.banned h3 {
    color: var(--banned);
}

.format-section.banned h3::before {
    background: var(--banned);
}

/* Restricted */
.format-section.restricted {
    background: var(--restricted-bg);
    border-color: rgba(245, 166, 35, 0.15);
}

.format-section.restricted h3 {
    color: var(--restricted);
}

.format-section.restricted h3::before {
    background: var(--restricted);
}

/* Legal */
.format-section.legal {
    background: var(--legal-bg);
    border-color: rgba(48, 164, 108, 0.15);
}

.format-section.legal h3 {
    color: var(--legal);
}

.format-section.legal h3::before {
    background: var(--legal);
}

/* Not Legal */
.format-section.not-legal {
    background: var(--not-legal-bg);
    border-color: rgba(85, 85, 85, 0.2);
}

.format-section.not-legal h3 {
    color: var(--not-legal);
}

.format-section.not-legal h3::before {
    background: var(--not-legal);
}

/* Points */
.format-section.points {
    background: var(--points-bg);
    border-color: rgba(139, 92, 246, 0.15);
}

.format-section.points h3 {
    color: var(--points);
}

.format-section.points h3::before {
    background: var(--points);
}

/* Format List */
.format-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.format-list li {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    transition: background var(--transition);
}

.format-section.banned .format-list li {
    background: rgba(229, 72, 77, 0.12);
    color: #ff8a8d;
}

.format-section.restricted .format-list li {
    background: rgba(245, 166, 35, 0.12);
    color: #ffcc66;
}

.format-section.legal .format-list li {
    background: rgba(48, 164, 108, 0.12);
    color: #6ddf9e;
}

.format-section.not-legal .format-list li {
    background: rgba(85, 85, 85, 0.12);
    color: var(--text-muted);
}

.format-section.points .format-list li {
    background: rgba(139, 92, 246, 0.12);
    color: #b794f6;
}

.format-section.points .format-list li strong {
    color: var(--text);
    font-weight: 600;
}

/* Empty Message */
.empty-message {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* Footer */
.footer {
    padding: 1.5rem 2rem;
    text-align: center;
}

.footer p {
    font-size: 0.8125rem;
    color: var(--text-subtle);
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* Responsive */
@media (max-width: 768px) {
    .results-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .card-aside {
        position: static;
        display: flex;
        justify-content: center;
    }
    
    .card-image {
        width: 180px;
    }
}

@media (max-width: 640px) {
    .header {
        padding: 1rem 1.25rem;
    }
    
    .main {
        padding: 1.25rem;
    }
    
    .search-container {
        padding: 3rem 0;
    }
    
    .search-container.compact {
        padding: 5rem 0 1.5rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .card-image {
        width: 160px;
    }
    
    .format-section {
        padding: 1rem 1.25rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Feedback Button */
.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.875rem;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.feedback-btn svg {
    width: 14px;
    height: 14px;
}

.feedback-btn:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg-subtle);
}

.modal-content h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Feedback Form */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    outline: none;
    transition: all var(--transition);
}

.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group textarea::placeholder {
    color: var(--text-subtle);
}

.submit-btn {
    margin-top: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--bg);
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.submit-btn:hover {
    background: var(--accent-hover);
}

.submit-btn:active {
    transform: scale(0.98);
}
