:root {
    --primary-color: #007BFF;
    --hover-color: #0056b3;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-text-color: #666;
    --white-color: #fff;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
    --invest-btn-color: #00A86B;
    --invest-btn-hover: #008B56;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--white-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    font-weight: 400;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--secondary-color);
    padding: 1rem 0;
me;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 1rem;
}

nav a {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    color: var(--primary-color);
    padding: 0.5rem 0;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    border-bottom: 2px solid transparent;
    display: block;
}

nav a:hover, nav a.active {
    color: var(--hover-color);
    border-bottom-color: var(--hover-color);
}

.nav-register {
    display: flex;
    align-items: center;
}

main {
    padding-top: 60px;
    padding-bottom: 80px;
}

.hero {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 4rem 2rem;
    text-align: center;
}

.hero h1 {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.content-section {
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h1 {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 2.6rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.content-section h2 {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.content-section p, .content-section li {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.content-section ul, .content-section ol {
    text-align: left;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
}

.content-section img {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 1rem auto;
    border-radius: 5px;
}

.btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.85rem 1.8rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    touch-action: manipulation;
}

.btn:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.btn-invest {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--invest-btn-color);
    color: var(--white-color);
    padding: 0.85rem 1.8rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    touch-action: manipulation;
}

.btn-invest:hover {
    background-color: var(--invest-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
}

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

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

.copy-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.bitcoin-address {
    font-weight: 700;
    word-break: break-all;
    margin: 0.5rem 0;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

footer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--secondary-color);
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--light-text-color);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 400;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-out;
    overflow: auto;
}

.modal-content {
    background-color: var(--white-color);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

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

.close-btn {
    color: var(--light-text-color);
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--text-color);
    text-decoration: none;
}

.modal-content h2 {
    font-family: 'Roboto Slab', Georgia, serif;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    font-weight: 700;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
    opacity: 1;
}

.form-group input:-ms-input-placeholder,
.form-group textarea:-ms-input-placeholder {
    color: #999;
}

.form-group input::-ms-input-placeholder,
.form-group textarea::-ms-input-placeholder {
    color: #999;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    margin-left: 1rem;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

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

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

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

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        z-index: 101;
        margin-right: 1rem;
    }

    nav ul {
        display: none;
        flex-direction: column;
        align-items: center;
        background-color: var(--secondary-color);
        position: fixed;
        top: 70px; /* Adjusted for Telegram header */
        left: 0;
        width: 100vw;
        max-width: 100%;
        padding: 1.5rem 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        max-height: 80vh; /* Increased to show all menu items */
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
        z-index: 99;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0.75rem 0;
        width: 100%;
        text-align: center;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    nav a {
        padding: 0.8rem 0;
        font-size: 1.1rem;
        display: block;
        width: 100%;
    }

    .nav-register {
        justify-content: center;
        width: 100%;
        display: flex; /* Ensure visibility */
    }

    header {
        padding: 0.8rem 0;
    }

    .modal-content {
        margin: 5% auto;
        width: 90%;
        max-height: 80vh;
        padding: 15px;
    }

    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }

    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="number"],
    .form-group input[type="text"],
    .form-group textarea {
        padding: 12px;
        font-size: 0.95rem;
    }

    .btn, .btn-invest, .copy-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    body {
        font-size: 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .content-section h1 {
        font-size: 2rem;
    }

    .content-section h2 {
        font-size: 1.6rem;
    }

    .content-section p, .content-section li {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.6rem 0;
    }

    nav ul {
        top: 50px;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .content-section {
        padding: 1.5rem 1rem;
    }

    .content-section h1 {
        font-size: 1.8rem;
    }

    .content-section h2 {
        font-size: 1.4rem;
    }

    .content-section p, .content-section li {
        font-size: 0.9rem;
    }

    .content-section img {
        max-width: 250px;
    }

    .btn, .btn-invest, .copy-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    footer {
        font-size: 0.8rem;
        padding: 1rem;
    }

    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 10px;
        max-height: 85vh;
    }

    .modal-content h2 {
        font-size: 1.3rem;
    }

    .close-btn {
        font-size: 20px;
        top: 8px;
        right: 10px;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="number"],
    .form-group input[type="text"],
    .form-group textarea {
        padding: 10px;
        font-size: 0.9rem;
    }

    .error-message {
        font-size: 0.8rem;
    }

    body {
        font-size: 14px;
    }
}