/* Base styles */
:root {
    --primary: #ff5555;
    --primary-hover: #ff3333;
    --background: #1a1a1a;
    --surface: #252525;
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --border: #333333;
    --shadow: rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-text-size-adjust: 100%; /* Отключает масштабирование текста */
}

/* Container */
.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-align: center;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary), #ff8a8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 2rem;
}

/* Avatar */
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: block;
    border: 3px solid var(--primary);
    transition: var(--transition);
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.3);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin: 0.5rem;
    min-width: 160px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 85, 85, 0.3);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.button:active {
    transform: translateY(0);
}

/* Card styles */
.card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem 0;
    box-shadow: 0 4px 6px var(--shadow);
    transition: var(--transition);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px var(--shadow);
}

/* Services section */
.services {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.services h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.services p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.services span {
    color: var(--primary);
    font-weight: 600;
}

/* Form elements */
.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
    text-align: center;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 85, 85, 0.2);
}

/* Button group */
.button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.preset-button {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
    width: 100%;
    font-size: 0.9rem;
}

.preset-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 85, 85, 0.3);
}

/* Spoiler styles */
details {
    background-color: var(--surface);
    border: 1px solid var(--primary);
    border-radius: 12px;
    margin: 1rem 0;
    transition: var(--transition);
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.2rem;
}

details:hover {
    border-color: var(--primary-hover);
    box-shadow: 0 0 20px rgba(255, 85, 85, 0.2);
}

details summary {
    color: var(--primary);
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    display: block;
    width: 100%;
}

details summary:hover {
    color: var(--primary-hover);
}

details[open] summary {
    color: var(--primary-hover);
    margin-bottom: 1rem;
}

details .spoiler-content {
    padding: 1.5rem;
    color: var(--text);
    border-top: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
    text-align: center;
    width: 100%;
}

/* Footer */
.footer-links {
    margin-top: 2rem;
    text-align: center;
    width: 100%;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 1rem;
    transition: var(--transition);
}

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

/* Links general style */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Banner */
.banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
    transition: var(--transition);
}

.banner:hover {
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .button-group {
        grid-template-columns: 1fr;
        max-width: 300px;
    }

    .card {
        padding: 1.5rem;
    }

    .services {
        padding: 1.5rem;
    }

    .button {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 100px;
    }

    .preset-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .banner {
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .banner img {
        width: 100px;
    }
}

/* Стили для services */
.services {
    margin-top: 30px;
    padding: 15px;
    background-color: #2d2d2d;
    border-radius: 10px;
    font-size: 14px;
    color: #ccc;
    width: 100%;
    box-sizing: border-box;
}

.services h2 {
    color: #ff5555;
    font-size: 18px;
    margin: 0 0 10px 0;
}

.services p {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.services span {
    color: #ff5555;
    font-weight: bold;
}

/* Стили для footer */
.footer-links {
    margin-top: 20px;
    font-size: 14px;
}

.footer-links a {
    color: #ff5555;
    text-decoration: none;
    margin: 0 10px;
}

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

/* Стили для banner */
.banner {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
}

/* Стили для pay.html */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    background-color: #2d2d2d;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    box-sizing: border-box;
}

input[type="number"]:focus {
    outline: none;
    background-color: #353535;
}

.commission-note {
    font-size: 14px;
    color: #ccc;
    margin-top: 10px;
    background-color: #2d2d2d;
    padding: 10px;
    border-radius: 10px;
}

.error {
    color: #ff5555;
    font-size: 14px;
    margin-top: 10px;
    background-color: #2d2d2d;
    padding: 10px;
    border-radius: 10px;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
    padding-bottom: 10px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.preset-button {
    padding: 10px 20px;
    font-size: 14px;
    color: #fff;
    background-color: #ff5555;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.preset-button:hover {
    background-color: #ff3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 85, 85, 0.3);
}

.preset-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.custom-amount-text {
    font-size: 18px;
    color: #ccc;
    margin-top: 15px;
    padding-bottom: 15px;
}

/* Bubble styles */
.bubble {
    background-color: var(--surface);
    color: var(--text);
    padding: 1.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
    box-shadow: 0 4px 8px var(--shadow);
    position: relative;
    text-align: left;
    word-wrap: break-word;
    line-height: 1.5;
}

.bubble p {
    margin-bottom: 0.75rem;
}

.bubble ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.bubble ul li {
    position: relative;
    padding: 0.25rem 0 0.25rem 1.5rem;
    margin: 0.25rem 0;
    background: none;
    border-radius: 0;
    line-height: 1.5;
}

.bubble ul li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
    font-weight: bold;
}

.bubble h2 {
    font-size: 1.2rem;
    margin: 1.25rem 0 0.75rem 0;
    color: var(--text);
}

.bubble .chemical {
    font-family: 'Inter', monospace;
    font-size: 1.1em;
    text-align: center;
    margin: 1rem 0;
}

.bubble sub {
    font-size: 0.75em;
    vertical-align: sub;
}

@media (max-width: 768px) {
    .bubble {
        padding: 1.25rem;
        font-size: 0.95rem;
    }

    .bubble ul li {
        padding-left: 1.25rem;
    }

    .bubble ul li::before {
        left: 0.25rem;
    }
}

pre {
    background: #2d2d2d;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
}

code {
    font-family: 'Exo 2', sans-serif;
    font-size: 14px;
}

p[lang="latex"] {
    vertical-align: middle;
}

span[lang="latex"] {
    display: inline;
    vertical-align: middle;
}

.bordered {
    border: 1px solid red;
}

.block {
    display: block;
    text-align: center;
}

p {
    margin-block-end: 1em;
}

ol {
    margin-block-start: 0em;
    margin-block-end: 1em;
    padding-inline-start: 35px;
}

/* Стили для offer.html и privacy.html */
.offer, .privacy {
    text-align: left;
    padding: 20px;
    background-color: #2d2d2d;
    border-radius: 10px;
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

.offer p, .privacy p {
    margin: 10px 0;
}

.offer strong, .privacy strong {
    color: #ff5555;
}

/* Стили для success.html */
.success-icon {
    font-size: 80px;
    color: #ff5555;
    margin-bottom: 20px;
}

.redirect-note {
    font-size: 14px;
    color: #ccc;
    margin-top: 20px;
}

/* Стили для спойлеров */
details {
    background-color: #2d2d2d;
    border: 2px solid #ff5555;
    border-radius: 10px;
    margin: 10px 0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Ограничиваем переходы */
}

details:hover {
    border-color: #ff3333;
    box-shadow: 0 0 10px rgba(255, 85, 85, 0.2);
}

details summary {
    color: #ff5555;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

details summary:hover {
    color: #ff3333;
}

details[open] summary {
    color: #ff3333;
}

details .spoiler-content {
    padding: 15px;
    color: #ff5555;
    font-size: 12px;
    border-top: 1px solid rgba(255, 85, 85, 0.2);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Медиа-запросы */
@media (max-width: 600px) {
    .services {
        font-size: 12px;
    }

    .footer-links {
        font-size: 12px;
    }

    .banner img {
        width: 100px;
    }

    .custom-amount-text {
        font-size: 16px;
    }

    .button-group {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }
    
    .preset-button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .commission-note,
    .error {
        font-size: 12px;
    }

    .bubble {
        max-width: 90%;
        padding: 12px 18px;
        word-break: break-word;
    }

    details img {
        width: 100%;
    }

    .bubble .MathJax_Display {
        max-width: 100%;
        word-wrap: break-word;
        text-align: left;
        margin-left: 0;
    }

    .bubble pre {
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    .offer, .privacy {
        font-size: 12px;
        padding: 15px;
    }

    .success-icon {
        font-size: 60px;
    }

    .redirect-note {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .offer, .privacy {
        font-size: 11px;
    }

    .button-group {
        grid-template-columns: 1fr;
        max-width: 200px;
    }
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
    width: 100%;
    max-width: 800px;
}

ul li {
    position: relative;
    padding: 0.75rem 0;
    padding-left: 2.5rem;
    color: var(--text);
    line-height: 1.6;
    margin: 0.5rem 0;
    background-color: var(--surface);
    border-radius: 8px;
}

ul li::before {
    content: "•";
    position: absolute;
    left: 1rem;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2em;
}

/* Стили для вложенных списков */
ul ul {
    margin: 0.5rem 0 0.5rem 1rem;
}

ul ul li {
    background-color: transparent;
    padding: 0.5rem 0 0.5rem 2rem;
    margin: 0;
}

ul ul li::before {
    left: 0.75rem;
}

/* Стили для нумерованных заголовков */
.numbered-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 1rem 0;
    display: flex;
    align-items: center;
}

.numbered-title::before {
    content: attr(data-number);
    color: var(--primary);
    font-weight: bold;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    ul li {
        padding-left: 2rem;
    }
    
    ul li::before {
        left: 0.75rem;
    }
    
    ul ul li {
        padding-left: 1.75rem;
    }
    
    ul ul li::before {
        left: 0.5rem;
    }
} 