:root {
    --bg-primary: #0b0f14;
    --bg-secondary: #0f111a;
    --bg-gradient-start: #12202f;

    --text-primary: #dbe4ee;
    --text-secondary: #9fb3c8;
    --text-link: #7d828e;

    --accent-primary: #3ddcff;
    --accent-primary-text: #000;

    --border-color: var(--text-secondary);
    --switcher-hover-bg: rgba(177, 177, 177, 0.25);

    --icon-color: rgb(33 33 33);
}

html[data-theme='dark'] {
    --bg-primary: #0b0f14;
    --bg-secondary: #0f111a;
    --bg-gradient-start: #12202f;

    --text-primary: #dbe4ee;
    --text-secondary: #9fb3c8;
    --text-link: #7f8691;

    --accent-primary: #3ddcff;
    --accent-primary-text: #000;

    --border-color: var(--text-secondary);
    --switcher-hover-bg: rgba(255, 255, 255, 0.15);

    --icon-color: #e1e1e1;
}

body.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #d7d7d7;
    --bg-gradient-start: #e9eff5;

    --text-primary: #1c1e21;
    --text-secondary: #546e7a;
    --text-link: #37474f;

    --accent-primary: #007bff;
    --accent-primary-text: #fff;

    --border-color: var(--text-secondary);

    --icon-color: #1c1e21;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ---------- Header ---------- */

.header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

/* ---------- Theme Switcher ---------- */

.theme-switcher {
    width: 40px;
    height: 40px;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.theme-switcher:hover {
    background-color: var(--switcher-hover-bg);
    border-radius: 50%;
}

.theme-switcher svg {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 8px;
    left: 8px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.2s ease, transform 0.2s ease;
    stroke: var(--icon-color);
    fill: none;
}

.theme-switcher .icon-auto {
    fill: var(--icon-color);
    stroke: none;
}

html[data-theme="light"] .icon-sun,
html[data-theme="dark"] .icon-moon,
html[data-theme="auto"] .icon-auto {
    opacity: 1;
    transform: scale(1);
}

/* ---------- Hero ---------- */

.hero {
    text-align: center;
    padding: 80px 20px 60px;
    background: radial-gradient(circle at top, var(--bg-gradient-start), var(--bg-primary));
}

.hero h1 {
    font-size: 56px;
    color: var(--accent-primary);
}

.hero h2 {
    font-size: 28px;
    margin-top: 10px;
}

.hero p {
    margin-top: 20px;
    color: var(--text-secondary);
}

/* ---------- Setup ---------- */

.setup {
    padding: 40px 60px 80px;
}

.doh-link-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 10px;
    flex-wrap: wrap;
}

.input-copy-wrapper {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

#doh-link {
    pointer-events: none; /* запрещает взаимодействие мышью */
    user-select: none; /* нельзя выделять текст */
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    flex-grow: 1;
    font-family: monospace;
}

#copy-button {
    padding: 12px 13px;
    background: var(--accent-primary);
    color: var(--accent-primary-text);
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

#copy-button:hover {
    opacity: 0.9;
}

#copy-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;

}

.icon-check {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    stroke: #000;
}

#copy-button.copied {
    background-color: #4BB543;
}

#copy-button.copied .icon-copy {
    opacity: 0;
    transform: scale(0);
}

#copy-button.copied .icon-check {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}


/* ---------- Tabs ---------- */

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 15px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 25px;
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-link);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tab-button:hover {
    background: var(--bg-gradient-start);
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--bg-gradient-start);
}

.tab-content {
    display: none;
    padding: 30px;
    border-radius: 14px;
}

.tab-content.active {
    display: block;
}

.tab-content h4 {
    margin-bottom: 15px;
    font-size: 20px;
    color: var(--accent-primary);
}

.tab-content p,
.tab-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.tab-content ul {
    max-width: 600px;
    margin: 0 auto;
    padding-left: 20px;
    text-align: left;
}

/* ---------- Popup ---------- */

.popup {
    display: none;
    position: absolute;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    top: calc(100% + 5px);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
}

.popup.show {
    display: block;
    opacity: 1;
    top: 100%;
}

/* ---------- Footer ---------- */

.footer {
    margin-top: auto;
    text-align: center;
    padding: 1rem;
    background: var(--bg-primary);
}

.footer a {
    color: var(--text-link);
    text-decoration: none;
}

.tab-content a {
    color: var(--text-link);
    text-decoration: underline; /* или none, если подчеркивания не нужно */
}

.tab-content a:hover {
    color: var(--accent-primary);
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 40px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .setup {
        padding: 20px;
    }

    .tab-content {
        padding: 0;
    }
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --icon-color: #e1e1e1;
    }
}

@media (prefers-color-scheme: light) {
    html[data-theme="auto"] {
        --icon-color: #1c1e21;
    }
}
