/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #fff;
    color: var(--dark-text);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

/* Navbar */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar-brand {
    flex: 0 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.navbar-languages {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.navbar-languages select {
    width: 100%;
    max-width: 180px;
}

.navbar-auth {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 0.25rem;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

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

.btn-primary:hover,
a.btn-primary:hover {
    background-color: #0056b3;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 123, 255, 0.35);
}

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

.btn-secondary:hover,
a.btn-secondary:hover {
    background-color: #5a6268;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(92, 107, 115, 0.35);
}

.btn-copy {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
}

.btn-copy:hover {
    background-color: #5a6268;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    min-width: 200px;
}

/* Section Styles */
section {
    padding: 3rem 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--dark-text);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 2rem;
}

/* Telegram Highlight */
.telegram-highlight {
    background: linear-gradient(135deg, #f7f9ff 0%, #eef4ff 100%);
}

.telegram-highlight__content {
    display: grid;
    gap: 3rem;
    align-items: stretch;
}

.telegram-highlight__details {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.badge-telegram {
    background-color: rgba(0, 136, 204, 0.15);
    color: #007bff;
    font-weight: 600;
}

.telegram-highlight__subtitle {
    font-size: 1.25rem;
    color: #4c4f5a;
    margin: 1rem 0 1.5rem;
}

.telegram-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.telegram-benefits li {
    position: relative;
    padding-left: 2rem;
    font-size: 1rem;
    color: #3a3f4b;
}

.telegram-benefits li::before {
    content: "*";
    position: absolute;
    left: 0;
    top: 0;
    color: #007bff;
    font-size: 1rem;
}

.telegram-cta {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.telegram-cta .btn {
    flex: 1 1 220px;
}

.telegram-note {
    margin-top: 1rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.telegram-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(13, 61, 140, 0.15);
    width: 100%;
    max-width: 420px;
}

.telegram-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.telegram-card__title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e1f29;
}

.telegram-card__status {
    font-size: 0.9rem;
    color: #6c757d;
}

.telegram-card__badge {
    font-size: 0.85rem;
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.telegram-card__message {
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.telegram-card__message--user {
    background: #f1f5ff;
    margin-left: 3rem;
}

.telegram-card__message--bot {
    background: #e8f7ff;
    margin-right: 3rem;
}

@media (max-width: 992px) {

    .telegram-highlight__details {
        padding: 2rem;
    }

    .telegram-card {
        max-width: none;
    }
}

@media (max-width: 576px) {
    .telegram-benefits li {
        padding-left: 1.5rem;
    }

    .telegram-benefits li::before {
        font-size: 0.85rem;
    }

    .telegram-cta {
        flex-direction: column;
    }

    .telegram-cta .btn {
        flex: 1 1 auto;
        width: 100%;
    }

    .telegram-highlight__details,
    .telegram-card {
        padding: 1.5rem;
    }
}

/* Examples Section */
.examples-section {
    background-color: var(--light-bg);
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.example-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.example-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.example-header h3 {
    font-size: 1.3rem;
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.example-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.example-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.example-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

code {
    background-color: var(--light-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #d63384;
}

.bot-command-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.bot-command-list li {
    margin-bottom: 1rem;
}

.bot-command-list li:last-child {
    margin-bottom: 0;
}

.bot-command-list .command-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.bot-command-list .command-check {
    color: var(--success-color);
    font-weight: 700;
}

.bot-command-list code {
    background-color: #f2f6ff;
    color: #0056b3;
    padding: 0.2rem 0.6rem;
    border-radius: 0.35rem;
    font-weight: 600;
    word-break: break-word;
}

.bot-command-list .command-desc {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.bot-command-list .command-hint {
    margin: 0.4rem 0 0 1.65rem;
    font-size: 0.85rem;
    color: #6f7691;
}

.example-screenshot {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.telegram-mockup {
    background-color: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.9rem;
}

.telegram-message {
    background-color: #e7f3ff;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0.25rem;
    text-align: left;
}

.telegram-message.user {
    background-color: #fff3cd;
    text-align: right;
    margin-left: 2rem;
}

.telegram-message p {
    margin: 0.25rem 0;
}

.mockup-container {
    background-color: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1rem;
}

input, select {
    font-family: inherit;
    font-size: 0.95rem;
}

/* Payment Options Section */
.payment-options {
    background-color: white;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.option-card {
    background-color: var(--light-bg);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.option-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.option-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.option-description {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.option-features {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
    padding: 0;
}

.option-features li {
    padding: 0.5rem 0;
}

.option-fee {
    background-color: white;
    padding: 1rem;
    border-radius: 0.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
}

.option-fee-text {
    flex: 1;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: 0.75rem;
    cursor: default;
    position: relative;
}

.info-icon .info-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    transform: translateX(-50%);
    background: #0f172a;
    color: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    line-height: 1.4;
    width: 220px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.info-icon:hover .info-tooltip,
.info-icon:focus .info-tooltip {
    opacity: 1;
    visibility: visible;
}

.info-icon.static {
    background: var(--primary-color);
    color: white;
    border: none;
}

.info-icon.static .info-tooltip {
    display: none;
}

.fee-note {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    color: var(--secondary-color);
}

.fee-note a {
    color: var(--primary-color);
}

.fee-note .info-icon {
    flex-shrink: 0;
}

.fee-note-text {
    line-height: 1.5;
}

/* Create Link Section */
.create-link-section {
    background-color: var(--light-bg);
}

.create-form {
    max-width: 600px;
    margin: 2rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

.form-group label .optional-note {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-left: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    min-height: 60px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.large-order-hint {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 0.4rem;
}

.large-order-hint a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.form-actions .btn-large {
    width: 100%;
    max-width: 400px;
}

/* Result Box */
.result-box {
    max-width: 600px;
    margin: 2rem auto;
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--success-color);
}

.result-content h3 {
    color: var(--success-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.result-link-section,
.result-qr {
    margin-bottom: 1.5rem;
}

.result-link-section p,
.result-qr p {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.link-copy-container {
    display: flex;
    gap: 0.5rem;
}

.result-link {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.qr-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 0.25rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.result-actions .btn {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
}

/* Features Section */
.features-section {
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-section {
    background: white;
    padding: 3rem 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.faq-item {
    background: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    margin: 0;
    color: var(--secondary-color);
    line-height: 1.5;
}

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.feature p {
    color: var(--secondary-color);
}

/* Contact Section */
.contact-section {
    background-color: var(--light-bg);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.contact-info-card,
.contact-form-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-note {
    margin-top: 1rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.contact-status {
    margin-top: 1rem;
    font-size: 0.95rem;
    min-height: 1.2rem;
}

.contact-status.success {
    color: var(--success-color);
}

.contact-status.error {
    color: var(--danger-color);
}

/* Footer */
.footer {
    background-color: var(--dark-text);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 3rem;
}

.footer p {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        min-width: unset;
        width: 100%;
    }

    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .examples-grid,
    .options-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }

    .link-copy-container {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .option-card,
    .example-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    section {
        padding: 1.5rem 1rem;
    }

    .create-form {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-auth {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .navbar-languages {
        flex: 1 1 55%;
        justify-content: flex-start;
    }

    .navbar-auth .btn {
        flex: 1 1 45%;
        width: auto;
        justify-content: center;
    }

    .lang-select {
        max-width: none;
    }

    .bot-command-list .command-line {
        flex-direction: column;
        align-items: flex-start;
    }

    .bot-command-list .command-hint {
        margin-left: 0;
    }

    .example-card,
    .option-card {
        padding: 1.25rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .api-cta-card,
    .api-details {
        padding: 1.5rem;
    }

    .option-card,
    .example-card,
    .create-form,
    .result-box {
        padding: 1.25rem;
    }
}

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

.example-card, .option-card, .feature {
    animation: fadeIn 0.5s ease-out;
}

/* Loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
}

/* Input placeholder styling */
input::placeholder,
select::placeholder {
    color: #bbb;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 9999;
}

.lang-btn {
    padding: 8px 12px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 12px;
}

.lang-btn:hover {
    background: #007bff;
    color: white;
}

.lang-btn.active {
    background: #007bff;
    color: white;
}

/* API Section */
.api-section {
    background: white;
}

.api-container {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    padding: 3rem 0;
}

.api-details {
    flex: 2;
    background: #f8f9ff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.api-details h2 {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.api-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.api-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.api-feature-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    position: relative;
    font-weight: 500;
}

.api-feature-list li:before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
}

.api-cta-card {
    flex: 1;
    background: #1b2559;
    color: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 45px rgba(27, 37, 89, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-cta-card h3 {
    margin: 0;
    font-size: 1.5rem;
}

.api-cta-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.api-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .api-container {
        flex-direction: column;
    }
}
