/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-lat);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

/* Header */
header {
    position: relative;
    z-index: 10;
    padding: 60px 24px 0;
    text-align: center;
}

.header-inner {
    max-width: 700px;
    margin: 0 auto;
}

.header-kanji-bg {
    font-family: var(--font-jp);
    font-weight: 800;
    font-size: clamp(120px, 20vw, 220px);
    color: var(--primary);
    opacity: 0.05;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    line-height: 1;
    user-select: none;
    z-index: -1;
}

.header-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    background: var(--surface);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.eyebrow-text {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
}

h1 {
    font-family: var(--font-jp);
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
}

h1 .red {
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Search */
.search-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 0 40px;
    position: relative;
}

.search-box {
    width: 100%;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    padding: 16px 56px 16px 24px;
    font-family: var(--font-lat);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.search-box::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

.search-box:focus {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(255, 126, 179, 0.15), 0 0 0 4px var(--primary-pale);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: calc(50% - 20px);
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    font-size: 24px;
    font-weight: bold;
}

/* Main & Status */
main {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 8px;
}

.status-count {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

.status-count strong {
    color: var(--primary);
    font-size: 16px;
}

.status-hint {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 600;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
}

footer span {
    color: var(--primary);
    font-weight: bold;
}

.footer-content {
    max-width: 500px;
    margin: 0 auto;
}

.footer-text {
    margin-bottom: 8px;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 126, 179, 0.5);
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-hover);
    border-bottom-style: solid;
}

.footer-subtext {
    font-size: 12px;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-coming {
    display: inline-block;
    margin-top: 4px;
    color: var(--primary);
    font-weight: 700;
}

/* Responsive Base */
@media (max-width: 600px) {
    header {
        padding: 40px 16px 0;
    }

    main {
        padding: 0 16px 80px;
    }

    .status-bar {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .footer-subtext br {
        display: none;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg);
}

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

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