/* ============================================
   MULTIPLE LINK OPENER – style.css
   ============================================ */

:root {
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --text: #111827;
    --text-light: #4b5563;
    --border: #e5e7eb;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: 0.2s ease;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============ TOP AD ============ */
.top-ad {
    width: 100%;
    max-width: 100%;
    background: #f0f2f5;
    padding: 0.8rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border);
    overflow-x: hidden;
}

.top-ad-inner {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-ad-inner iframe {
    max-width: 100%;
    height: auto;
}

/* ============ HEADER ============ */
.site-header {
    width: 100%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: center;
}

.header-inner {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1.2rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--accent);
}

/* ============ PAGE LAYOUT ============ */
.page-layout {
    width: 100%;
    max-width: 1500px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    flex: 1;
}

.main-content {
    flex: 1;
    max-width: 800px;
    width: 100%;
    min-width: 0;
}

/* ============ SIDE ADS ============ */
.side-ad {
    width: 160px;
    flex-shrink: 0;
    display: none; /* hidden by default */
}

.side-ad-sticky {
    position: sticky;
    top: 1.5rem;
    min-height: 600px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.side-ad iframe {
    width: 160px;
    height: 600px;
    border: none;
}

/* Show side ads only on wide desktop */
@media (min-width: 1200px) {
    .side-ad {
        display: block;
    }
}

/* ============ INTRO SECTION ============ */
.intro-section {
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 650px;
}

/* ============ TOOL CARD ============ */
.tool-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem 1.8rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.tool-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.tool-description {
    color: var(--text-light);
    margin-bottom: 1.8rem;
    font-size: 1rem;
}

/* Textarea */
.input-group {
    margin-bottom: 1rem;
}

.url-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafafa;
    color: var(--text);
    resize: vertical;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.url-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #fff;
}

.url-textarea::placeholder {
    color: #9ca3af;
}

/* Meta area */
.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.link-counter {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Buttons */
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition), transform 0.1s ease;
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

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

.btn-primary:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 2px;
}

.btn-secondary {
    background-color: #eef2ff;
    color: var(--accent);
}

.btn-secondary:hover {
    background-color: #e0e7ff;
}

.btn-secondary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-tertiary {
    background-color: #f3f4f6;
    color: var(--text-light);
}

.btn-tertiary:hover {
    background-color: #e5e7eb;
}

.btn-tertiary:focus-visible {
    outline: 2px solid #9ca3af;
    outline-offset: 2px;
}

/* Status area */
.status {
    min-height: 1.5em;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Validated links list */
.validated-links-container {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
}

.validated-links-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.validated-links-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.validated-links-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.validated-links-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validated-links-list a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
    font-size: 0.9rem;
}

.validated-links-list a:hover {
    text-decoration: underline;
}

/* ============ HELP SECTION ============ */
.help-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text);
}

.help-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow);
}

.help-card p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.help-card strong {
    color: var(--text);
}

/* ============ SEO CONTENT ============ */
.seo-content {
    margin-bottom: 2.5rem;
}

.content-block {
    margin-bottom: 2.5rem;
}

.content-block p,
.content-block li {
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.step-list,
.info-list {
    padding-left: 1.5rem;
}

.step-list li,
.info-list li {
    margin-bottom: 0.6rem;
}

.faq-item {
    margin-bottom: 1.8rem;
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.faq-answer {
    color: var(--text-light);
}

.privacy-note {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ============ BOTTOM AD ============ */
.bottom-ad {
    width: 100%;
    background: #f0f2f5;
    padding: 1rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
    overflow-x: hidden;
}

.bottom-ad-inner {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

/* ============ FOOTER ============ */
.site-footer {
    width: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1.5rem 1rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-light);
}

.footer-nav {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-separator {
    color: #9ca3af;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
    .tool-card {
        padding: 1.5rem 1rem;
    }

    .tool-title {
        font-size: 1.8rem;
    }

    .url-textarea {
        min-height: 160px;
        font-size: 0.85rem;
    }

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

    .btn {
        justify-content: center;
        width: 100%;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-nav {
        gap: 1rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .top-ad-inner {
        min-height: 60px;
    }
}

/* Accessibility: visually hidden labels but still accessible */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}