/* ═══════════════════════════════════════════════════════════
   BLANK MINDED — Site Finder Page
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Default Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-input: #f5f5f5;
    --border-light: #f0f0f0;
    --border-mid: #e0e0e0;
    --text-primary: #1a1a1a;
    --text-secondary: #888888;
    --text-muted: #b0b0b0;
    --accent: #1a1a1a;
    --accent-contrast: #ffffff;
    
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Karla', -apple-system, sans-serif;
    
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Theme Variations */
body.theme-dark {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-input: #1a1a1a;
    --border-light: #222222;
    --border-mid: #333333;
    --text-primary: #f5f5f5;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent: #ffffff;
    --accent-contrast: #0a0a0a;
}

body.theme-cream {
    --bg-primary: #faf8f5;
    --bg-secondary: #f5f2ed;
    --bg-input: #efe9e0;
    --border-light: #e8e2d9;
    --border-mid: #d4ccc0;
    --text-primary: #3d3529;
    --text-secondary: #7a6f5f;
    --text-muted: #a69f8f;
    --accent: #3d3529;
    --accent-contrast: #faf8f5;
}

body.theme-midnight {
    --bg-primary: #0f1624;
    --bg-secondary: #172033;
    --bg-input: #1e2a42;
    --border-light: #2a3a55;
    --border-mid: #3d4f6f;
    --text-primary: #e8ecf4;
    --text-secondary: #8fa3c4;
    --text-muted: #5a7099;
    --accent: #7cacf8;
    --accent-contrast: #0f1624;
}

body.theme-rose {
    --bg-primary: #fdf7f7;
    --bg-secondary: #faf0f0;
    --bg-input: #f5e8e8;
    --border-light: #eddede;
    --border-mid: #e0cccc;
    --text-primary: #4a3535;
    --text-secondary: #8a6b6b;
    --text-muted: #b89a9a;
    --accent: #c47878;
    --accent-contrast: #ffffff;
}

body.theme-forest {
    --bg-primary: #f5f8f5;
    --bg-secondary: #eef3ee;
    --bg-input: #e5ede5;
    --border-light: #d5e0d5;
    --border-mid: #bfd0bf;
    --text-primary: #2d3d2d;
    --text-secondary: #5a755a;
    --text-muted: #8aa88a;
    --accent: #4a7c4a;
    --accent-contrast: #ffffff;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.025;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Emoji Rain */
.emoji-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.falling-emoji {
    position: absolute;
    top: -50px;
    font-size: 1.5rem;
    opacity: 0.08;
    animation: fall linear infinite;
}

@keyframes fall {
    0% { transform: translateY(-50px) rotate(0deg); }
    100% { transform: translateY(calc(100vh + 50px)) rotate(360deg); }
}

/* Theme Switcher */
.theme-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s var(--ease-out);
}

.theme-btn:hover {
    background: var(--bg-input);
    border-color: var(--border-mid);
    color: var(--text-primary);
    transform: rotate(45deg);
}

.theme-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
    z-index: 200;
}

.theme-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.theme-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 320px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
    z-index: 300;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.theme-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.theme-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.theme-header h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-primary);
}

.close-theme {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

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

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.theme-option:hover {
    border-color: var(--border-mid);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--accent);
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.light-preview { background: linear-gradient(135deg, #ffffff 50%, #f0f0f0 50%); }
.dark-preview { background: linear-gradient(135deg, #1a1a1a 50%, #0a0a0a 50%); }
.cream-preview { background: linear-gradient(135deg, #faf8f5 50%, #efe9e0 50%); }
.midnight-preview { background: linear-gradient(135deg, #1e2a42 50%, #0f1624 50%); }
.rose-preview { background: linear-gradient(135deg, #fdf7f7 50%, #f5e8e8 50%); }
.forest-preview { background: linear-gradient(135deg, #f5f8f5 50%, #e5ede5 50%); }

.theme-option span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 25px;
    text-decoration: none;
    z-index: 50;
    transition: all 0.3s var(--ease-out);
}

.back-btn:hover {
    background: var(--bg-input);
    border-color: var(--border-mid);
    color: var(--text-primary);
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

.content {
    text-align: center;
    width: 100%;
    max-width: 700px;
}

/* Logo */
.logo {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.logo-dot {
    color: var(--text-muted);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

/* Finder Title */
.finder-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.finder-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Search Form */
.search-form {
    margin-bottom: 2rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 0.5rem;
    transition: all 0.3s var(--ease-out);
}

.search-wrapper:focus-within {
    background: var(--bg-primary);
    border-color: var(--border-mid);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.search-icon {
    margin-left: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    padding: 1rem;
}

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

.search-btn {
    padding: 0.9rem 1.8rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent-contrast);
    background: var(--accent);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Loading */
.finder-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 0;
}

.finder-loading.hidden {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-light);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.finder-loading p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Results */
.finder-results {
    text-align: left;
}

.finder-results.hidden {
    display: none;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.clear-results {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.clear-results:hover {
    color: var(--text-primary);
}

.result-item {
    display: block;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
}

.result-item:hover {
    background: var(--bg-input);
    border-color: var(--border-mid);
    transform: translateY(-2px);
}

.result-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.result-url {
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
}

/* Popular Searches */
.popular-searches {
    margin-top: 2rem;
}

.popular-searches.hidden {
    display: none;
}

.popular-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.popular-tag {
    padding: 0.5rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.popular-tag:hover {
    background: var(--bg-secondary);
    border-color: var(--border-mid);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 600px) {
    .theme-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .back-btn {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 5rem 1rem 3rem;
    }
    
    .search-wrapper {
        flex-wrap: wrap;
    }
    
    .search-input {
        width: 100%;
        padding: 0.8rem 0.5rem;
    }
    
    .search-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .search-icon {
        display: none;
    }
}

