:root {
    --primary-color: #a8d8ea;
    --secondary-color: #aa96da;
    --background-color: #f3f7f9;
    --container-bg: #ffffff;
    --text-color: #2d4059;
    --border-color: #e8e8e8;
    --success-color: #95e1d3;
    --danger-color: #f8a5c2;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-bar {
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    margin: 0 5px;
    animation: loading 1.5s infinite;
}

.loading-bar:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-bar:nth-child(3) {
    animation-delay: 0.4s;
}

.loading-bar:nth-child(4) {
    animation-delay: 0.6s;
}

.loading-bar:nth-child(5) {
    animation-delay: 0.8s;
}

.loading-bar:nth-child(6) {
    animation-delay: 1s;
}

@keyframes loading {
    0% {
        transform: scaleY(0.1);
    }
    50% {
        transform: scaleY(1);
    }
    100% {
        transform: scaleY(0.1);
    }
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin-top: 80px;
}

.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--container-bg);
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section {
    background-color: #fff;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    scroll-margin-top: 60px;
}

h1 {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 2rem;
}

h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    margin: 8px 0;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary-color);
    color: white;
}

.message {
    padding: 1rem;
    margin: 1rem auto;
    max-width: 800px;
    border-radius: 8px;
    display: none;
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 1000;
    width: 300px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 10px;
}

.success {
    background-color: var(--success-color);
    color: #fff;
}

.danger {
    background-color: var(--danger-color);
    color: #fff;
}

.fee-notice {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
}

.description {
    background-color: #fff;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.language-switcher {
    text-align: right;
    margin-bottom: 1rem;
}

.language-switcher button {
    width: auto;
    background-color: var(--secondary-color);
    color: white;
}

ul,
ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

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

a:hover {
    text-decoration: underline;
}

.secondary-button {
    background-color: var(--secondary-color);
    color: white;
    margin-top: 1rem;
    width: auto;
    display: inline-block;
}

.secondary-button:hover {
    background-color: var(--primary-color);
}

#balanceResult {
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 1rem;
}

#balanceResult button {
    margin-top: 1rem;
    width: auto;
    min-width: 200px;
}

.metamask-connection {
    text-align: left;
    margin: 2rem 0;
    margin-top: -66px;
}

.metamask-connection button {
    background-color: #f6851b;
    color: white;
    width: auto;
    min-width: 200px;
    margin: 0 auto;
}

.metamask-connection button:hover {
    background-color: #e2761b;
}

/* Стили для неактивных элементов */
button:disabled,
input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button:disabled:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.fixed-menu {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    justify-content: space-around;
    max-width: 1065px;
    margin: 0 auto;
    padding: 0;
    z-index: 100;
}

.menu-item {
    background-color: var(--primary-color);
    border-radius: 0;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    text-align: center;
    margin: 0 auto;
    vertical-align: middle;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item img {
    margin-right: 10px;
}

.menu-item:hover {
    background-color: var(--secondary-color);
}

@media (max-width: 1000px) {
    .menu-item {
        padding: 10px 10px;
    }
    .menu-item img {
        width: 20px;
        height: 20px;
    }
    .menu-item span {
        display: none;
    }
    body {
        margin-top: 0;
        margin-bottom: 15px;
        padding: 0;
    }
    .metamask-connection {
        margin-top: 10px;
    }
    .language-switcher {
        text-align: center;
    }
    .fixed-menu {
        top: auto;
        bottom: 0;
    }
    .container {
        margin-top: 0;
        margin-bottom: 0;
    }
    .section {
        scroll-margin-top: 15px;
    }
}

@media (min-width: 1000px) {
    .menu-item:first-child {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
    }
    .menu-item:last-child {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
    }
}
