@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/inter-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/inter-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/inter-600.woff2') format('woff2');
}

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

:root {
    --black: #000000;
    --white: #FFFFFF;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-800: #262626;
    --spacing-unit: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #5D3FD3;
}

ul, ol {
    margin-bottom: 20px;
    list-style-position: inside;
}

/* Grid System */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 3);
}

/* Header & Navigation */
header {
    border-bottom: 1px solid var(--black);
    margin-bottom: calc(var(--spacing-unit) * 6);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(var(--spacing-unit) * 3) 0;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1000;
}

.site-logo {
    height: 48px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: calc(var(--spacing-unit) * 4);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--black);
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
}

.nav-links a:hover,
.footer-nav a:hover {
    opacity: 0.6;
}

.nav-links a.coming-soon {
    color: var(--gray-800);
    cursor: default;
}

.badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--gray-200);
    border-radius: 3px;
    color: var(--gray-800);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Page Header */
.page-header {
    padding: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 4) 0;
    text-align: left;
    margin: 0 auto;
}

.page-header h1 {
    display: block;
    font-size: 33px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.page-header .subtitle {
    font-size: 18px;
    color: var(--gray-800);
    margin-top: calc(var(--spacing-unit) * 2);
}

/* Main Tool */
.tool-section {
    margin-bottom: calc(var(--spacing-unit) * 8);
}

label {
    display: block;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

textarea {
    width: 100%;
    min-height: 360px;
    padding: calc(var(--spacing-unit) * 2);
    border: 1px solid var(--black);
    background: var(--white);
    font-family: 'Inter', monospace;
    font-size: 16px;
    resize: vertical;
    transition: all 0.2s ease;
}

textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--black);
}

textarea::placeholder {
    color: var(--gray-300);
}

/* Buttons */
.button-group {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 3);
}

button {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background: var(--white);
    color: var(--black);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

button:disabled:hover {
    background: var(--black);
    color: var(--white);
}

.button-secondary {
    background: var(--white);
    color: var(--black);
}

.button-secondary:hover {
    background: var(--black);
    color: var(--white);
}

/* Donation Section */
.donation-section {
    margin: calc(var(--spacing-unit) * 8) 0;
    padding: calc(var(--spacing-unit) * 4);
    border: 1px solid var(--black);
    text-align: center;
}

.donation-section p {
    color: var(--gray-800);
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.donation-button {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
}

.donation-button:hover {
    background: var(--white);
    color: var(--black);
}

.beer-icon {
    width: 16px;
    height: 16px;
}

/* Username Results */
.username-group {
    margin-bottom: calc(var(--spacing-unit) * 3);
    border: 1px solid var(--gray-200);
}

.username-header {
    padding: calc(var(--spacing-unit) * 2);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.platform-links {
    padding: calc(var(--spacing-unit) * 2);
}

.platform-link-item {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 1) 0;
    font-size: 13px;
}

.platform-name {
    font-weight: 500;
    min-width: 80px;
}

.platform-link-item a {
    color: var(--black);
    text-decoration: none;
}

.platform-link-item a:hover {
    text-decoration: underline;
}

/* Results Section */
.results {
    display: none;
    margin-top: calc(var(--spacing-unit) * 6);
    border-top: 1px solid var(--black);
    padding-top: calc(var(--spacing-unit) * 4);
}

.results.active {
    display: block;
}

.results-list {
    display: grid;
    gap: calc(var(--spacing-unit) * 1);
}

.copy-btn {
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--black);
}

.copy-btn:hover {
    border-color: var(--black);
}

/* Shared Section Headings */
.instructions h2,
.results h2,
.seo-content h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.results h2 {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.instructions h3,
.seo-content h3,
.donation-section h3 {
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.seo-content h3 {
    margin-top: calc(var(--spacing-unit) * 4);
}

/* Instructions */
.instructions {
    margin-top: calc(var(--spacing-unit) * 6);
    padding: calc(var(--spacing-unit) * 3);
    border: 1px solid var(--black);
}

.instructions ol {
    margin-left: calc(var(--spacing-unit) * 3);
}

.instructions li {
    margin-bottom: calc(var(--spacing-unit) * 1);
    font-weight: 300;
}

.instructions strong {
    font-weight: 500;
}

/* SEO Content Section */
.seo-content {
    margin: calc(var(--spacing-unit) * 6) 0;
    padding: calc(var(--spacing-unit) * 4);
    border: 1px solid var(--gray-200);
}

.seo-content p {
    font-weight: 300;
    color: var(--gray-800);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

/* Platform Selection */
.platform-selection {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.platform-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.platform-checkboxes {
    display: flex;
    gap: calc(var(--spacing-unit) * 3);
    flex-wrap: wrap;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--black);
    background: var(--white);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:hover {
    background: var(--gray-100);
}

.checkbox-item input[type="checkbox"]:checked {
    background: var(--black);
    border-color: var(--black);
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Footer */
footer {
    margin-top: calc(var(--spacing-unit) * 12);
    padding: calc(var(--spacing-unit) * 4) 0;
    border-top: 1px solid var(--black);
    font-size: 14px;
    color: var(--gray-800);
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.footer-nav a {
    color: var(--black);
    text-decoration: none;
    font-weight: 500;
}

.footer-legal {
    display: flex;
    justify-content: center;
    gap: calc(var(--spacing-unit) * 3);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.footer-legal a {
    color: var(--gray-800);
    text-decoration: none;
    font-size: 13px;
}

.footer-legal a:hover {
    opacity: 0.6;
}

/* Utility */
.hidden {
    display: none;
}

/* Citation Box */
.citation-box {
    margin-top: calc(var(--spacing-unit) * 8);
    padding: calc(var(--spacing-unit) * 4);
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
}

.citation-text {
    font-style: italic;
    margin: calc(var(--spacing-unit) * 2) 0;
}

/* CTA Box */
.cta-box {
    margin-top: calc(var(--spacing-unit) * 8);
    padding: calc(var(--spacing-unit) * 4);
    border: 1px solid var(--black);
    text-align: center;
}

.cta-button {
    display: inline-block;
    margin-top: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
}

.cta-button:hover {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--black);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

th, td {
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    font-weight: 600;
    border-bottom: 2px solid var(--black);
}

/* Blog Archive */
.blog-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-list-item {
    padding: calc(var(--spacing-unit) * 3) 0;
    border-bottom: 1px solid var(--gray-200);
}

.blog-list-item:first-child {
    padding-top: 0;
}

.blog-list-date {
    font-size: 13px;
    color: var(--gray-800);
    display: block;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.blog-list-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: calc(var(--spacing-unit) * 1);
}

.blog-list-title a {
    color: var(--black);
    text-decoration: none;
}

.blog-list-title a:hover {
    opacity: 0.6;
}

.blog-list-excerpt {
    font-weight: 300;
    color: var(--gray-800);
}

/* Blog Post */
.blog-post-meta {
    font-size: 13px;
    color: var(--gray-800);
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.blog-post-nav {
    margin-top: calc(var(--spacing-unit) * 6);
    padding-top: calc(var(--spacing-unit) * 3);
    border-top: 1px solid var(--gray-200);
}

.blog-post-nav a {
    color: var(--black);
    font-weight: 500;
    text-decoration: none;
}

.blog-post-nav a:hover {
    opacity: 0.6;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-800);
    color: var(--white);
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--spacing-unit) * 3);
    z-index: 1002;
}

.cookie-banner-text {
    font-size: 14px;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--white);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 1);
    flex-shrink: 0;
}

.cookie-accept {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--white);
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 3);
    font-size: 14px;
}

.cookie-accept:hover {
    background: var(--gray-800);
    color: var(--white);
}

.cookie-decline {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 3);
    font-size: 14px;
}

.cookie-decline:hover {
    background: var(--white);
    color: var(--black);
}

/* Ad Containers */
.ad-container {
    margin: calc(var(--spacing-unit) * 4) 0;
    text-align: center;
    min-height: 90px;
}

/* Manual-only platforms footnote */
.manual-only-note {
    font-size: 12px;
    color: var(--gray-800);
    margin-top: calc(var(--spacing-unit) * -1);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: calc(var(--spacing-unit) * 4);
    margin-bottom: calc(var(--spacing-unit) * 3);
    flex-wrap: wrap;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.toggle-option input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--black);
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.toggle-option input[type="radio"]:checked {
    background: var(--black);
    border-color: var(--black);
}

.toggle-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
}

/* Status indicators */
.status-available {
    color: #16a34a;
    font-weight: 600;
}

.status-taken {
    color: #dc2626;
    font-weight: 600;
}

.status-manual {
    color: #ca8a04;
    font-weight: 500;
}

.status-checking {
    color: var(--gray-300);
    font-style: italic;
    animation: status-pulse 1.5s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Status legend */
.status-legend {
    display: flex;
    gap: calc(var(--spacing-unit) * 4);
    margin-top: calc(var(--spacing-unit) * 2);
    font-size: 13px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 1);
}

/* Profile link shown alongside "Taken" status */
.status-profile-link {
    font-size: 12px;
    color: var(--gray-800);
    margin-left: calc(var(--spacing-unit) * 1);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 calc(var(--spacing-unit) * 2);
    }

    h1 {
        font-size: 33px;
    }

    .button-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .platform-checkboxes {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 2);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: calc(var(--spacing-unit) * 10) calc(var(--spacing-unit) * 3);
        gap: calc(var(--spacing-unit) * 3);
        border-left: 1px solid var(--black);
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 16px;
    }

    .cookie-banner {
        flex-direction: column;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-accept,
    .cookie-decline {
        flex: 1;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header .subtitle {
        font-size: 16px;
    }
}
