:root {
    --font-sans: 'Poppins', 'Noto Sans SC', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --bg: #f7f7f9;
    --bg-soft: #ffffffcc;
    --text: #111;
    --text-soft: #333;
    --accent: #ff6bd6;
    --accent-2: #6be3ff;
    --card: #fff;
    --border: #e5e7eb;
    --shadow: rgba(17, 17, 17, 0.08);
    --cursor-default: url('image/arrow.png'), auto;
    --cursor-pointer: url('image/arrow_other.png'), pointer;
}

body.theme-dark {
    --bg: #0b0b0f;
    --bg-soft: #0b0b0fcc;
    --text: #f5f7fb;
    --text-soft: #ccd1d9;
    --accent: #ff9ae2;
    --accent-2: #8bdcff;
    --card: #12121a;
    --border: #2a2a33;
    --shadow: rgba(0,0,0,0.25);
    --cursor-default: url('image/arrow.png'), auto;
    --cursor-pointer: url('image/arrow_other.png'), pointer;
}

body {
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    color: var(--text);
    background: var(--bg);
    cursor: var(--cursor-default);
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
      radial-gradient(1200px 500px at 10% -10%, rgba(255,107,214,0.15), transparent 60%),
      radial-gradient(700px 400px at 90% 10%, rgba(107,227,255,0.12), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

body.theme-dark::before { content: none; }
body.theme-dark {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
}

/* Custom Cursor */
#cursorDot {
    position: fixed;
    left: 0;
    top: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    transform: translate(-50%, -50%);
    transition: none;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: normal;
    will-change: transform;
    backface-visibility: hidden;
}
body.theme-dark #cursorDot {
    background: rgba(255,255,255,0.5);
}

#cursorRing {
    position: fixed;
    left: 0;
    top: 0;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #00000080;
    background: transparent;
    transform: translate(-50%, -50%);
    transition: none;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    backface-visibility: hidden;
}
body.theme-dark #cursorRing { border-color: #ffffff80; }

a, button, input, .btn, .btn-toggle {
    cursor: var(--cursor-pointer);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: saturate(1.2) blur(8px);
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 16px;
}

.brand {
    display: flex; align-items: center; gap: 12px;
    color: var(--text); text-decoration: none;
}
.brand img { height: 36px; width: auto; }

.header-actions { display: flex; gap: 10px; position: relative; }

#themeToggle {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 8px;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.container {
    max-width: 60%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%; /* Ensure it tries to fill width */
    box-sizing: border-box;
}

.search-section {
    width: 100%;
    padding: 100px 0 50px;
    box-sizing: border-box;
}

.search-form {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.search-form input {
    width: 100%;
    padding: 15px 25px;
    font-size: 1.1em;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 999px;
    outline: none;
    box-shadow: 0 8px 24px var(--shadow);
    transition: all 0.3s;
    color: var(--text);
    box-sizing: border-box;
}

.search-form input:focus {
    box-shadow: 0 0 0 3px rgba(255,107,214,0.35), 0 12px 28px var(--shadow);
    border-color: var(--accent);
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    padding: 0 25px;
    font-size: 1em;
    background-color: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 999px;
    cursor: var(--cursor-pointer);
    transition: background-color 0.3s, transform 0.2s;
}

.search-form button:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: auto;
    font-size: 0.75em;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 0;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section:first-child {
    flex: 2;
}

.footer-section.action {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.btn-footer-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 30px;
    background-color: var(--text);
    color: var(--bg);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-footer-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow);
    color: var(--bg);
    opacity: 0.9;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1em;
}

.footer-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links-list a {
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-section p {
    color: var(--text-soft);
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0 0 10px;
}

.footer-legal {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.85em;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-legal a {
    color: var(--text-soft);
    text-decoration: none;
}

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

.submit-link-footer {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.submit-link-footer a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.85em;
    border: 1px solid var(--border);
    padding: 5px 15px;
    border-radius: 15px;
    transition: all 0.3s;
    background: var(--card);
}
.submit-link-footer a:hover {
    color: var(--text);
    border-color: var(--text);
}


/* Results */
.results-info {
    margin-bottom: 20px;
    color: var(--text-soft);
    font-size: 0.9em;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-item {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px var(--shadow);
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 20px;
    flex-shrink: 0;
    background: var(--bg);
    object-fit: cover;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    margin: 0 0 5px 0;
    font-size: 1.2em;
}

.result-title a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

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

.result-url {
    color: var(--text-soft);
    font-size: 0.85em;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-desc {
    color: var(--text-soft);
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .result-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .result-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .search-section {
        padding: 50px 0;
    }
}
