:root {
    --primary-text: #1a1a1a;
    --secondary-text: #6b7280;
    --background: #ffffff;
    --accent: #d946ef;
    --border-color: #e5e7eb;
    --link-color: #2471a3;
    --card-bg: #f9fafb;
    --old-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --btn-main-bg: #2471a3;
    --btn-main-hover-bg: #1f618d;
    --success-color: #7fdda7;
    --success-hover-color: #68cdfd;
}

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

html,
body {
    height: 100%;
}

body {
    color: var(--primary-text);
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a.regonly {
    color: var(--accent);
}

a.regonly:hover {
    color: var(--success-hover-color);
}

.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content {
    width: 1184px;
    margin: 0 auto;
    padding: 2rem 0;
    flex: 1;
}

header {
    background: var(--card-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-image {
    display: none;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    width: 100%;
}

.header-nav .content {
    justify-content: space-between;
    align-items: center;
    padding: 0;
    display: flex;
}

.header-buttons {
    display: flex;
    gap: 15px;
    justify-self: end;
    width: auto;
    align-items: center;
}

.header-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.telegram-txt {
    color: var(--primary-text);
    transition: all 0.3s ease-in-out;
}

.telegram-link {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.telegram-link:hover .telegram-txt {
    color: var(--success-hover-color);
}

.telegram-link:hover .telegram-icon {
    transform: scale(1.1);
}

.telegram-icon {
    height: 32px;
    margin-right: 10px;
    transition: all 0.3s ease-in-out;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 174px;
    height: 40px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    background: var(--btn-main-bg);
    color: var(--background);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    padding: 0 20px;
}

.btn:hover {
    background: var(--btn-main-hover-bg);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn.pulse {
    animation: pulse 2s infinite;
}

#main-content-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-wrapper {
    position: relative;
    z-index: 3;
    padding: 20px;
    text-align: center;
    color: var(--primary-text);
}

.content-wrapper h1 {
    margin-bottom: 40px;
}

.main-content {
    display: flex;
    gap: 30px 80px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

main.content h1 {
    text-align: center;
    margin-bottom: 0rem;
}

.main-content a:hover .service-icon {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

.status-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--old-shadow);
    border: 1px solid var(--border-color);
}

.status-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--link-color);
}

.status-card p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(36, 113, 163, 0.3);
    border-radius: 50%;
    border-top-color: var(--link-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1.5rem;
}

#video-box, #video-box-shadow, #video {
    display: none;
}

.service-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.service-icon {
    display: block;
    margin: 0 auto 10px auto;
    max-width: 150px;
    height: auto;
}

.service-name {
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
}

.faded {
    display: none;
}

#login_wrap {
    display: block;
}

#restore_wrap {
    display: none;
}

.form_wrap h2,
#registration h3 {
    text-align: center;
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-text);
    
}

.form_wrap .form_input,
#registration .form_input,
#registration select {
    width: 100%;
    border: 1px solid #6b7280;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--primary-text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    outline: none;
    height: auto;
}

.form_wrap .form_input {
    padding: 8px 15px;
}

#registration .form_input,
#registration select {
    padding: 10px 15px;
}

.form_wrap .form_input:focus,
#registration .form_input:focus,
#registration select:focus,
#registration .jq-selectbox.focused .jq-selectbox__select {
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(36, 113, 163, 0.2);
}

.form_wrap .form_input.field_error,
#registration .form_input.ot_field_required,
#registration select.ot_field_required,
#registration .jq-selectbox.ot_field_required .jq-selectbox__select {
    border-color: #dc3545 !important;
}

.form_wrap .form_actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.form_wrap .form_submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    background: var(--btn-main-bg);
    color: var(--background);
    border: 0px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.form_wrap .form_submit:hover {
    background: var(--btn-main-hover-bg);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form_wrap .page_show {
    font-size: 0.9rem;
    color: var(--link-color);
    transition: color 0.3s ease;
}

.form_wrap .page_show:hover {
    color: var(--btn-main-hover-bg);
}

.form_wrap .form_error {
    margin-top: 8px;
    margin-bottom: 15px;
    color: #dc3545;
    font-size: 0.9rem;
    min-height: 1.4em;
}

.form_wrap a.orlink {
    color: var(--link-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.form_wrap a.orlink:hover {
    color: var(--btn-main-hover-bg);
}

.form_wrap div.bottom_txt {
    font-size: 0.9rem;
    color: var(--secondary-text);
    text-align: center;
    margin-top: 24px;
}

#login {
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    color: var(--primary-text);
    background: var(--background);
    box-shadow: var(--old-shadow);
    margin-left: auto;
    margin-right: auto;
}

#login .form_group {
    margin-bottom: 10px;
}

#registration {
    max-width: 650px;
    margin: 40px auto;
    padding: 30px 40px;
    background: var(--background);
    border-radius: 15px;
    box-shadow: var(--old-shadow);
    color: var(--primary-text);
}

#registration .form_group {
    margin-bottom: 20px;
}

#registration .form_group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--primary-text);
}

#registration .form_group label.pl_20 {
    padding-left: 0;
}

#registration .form_group label .asterisk {
    color: #dc3545;
    font-weight: bold;
    margin-left: 3px;
}

#registration select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%231a1a1a" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

#registration .jq-selectbox__select {
    width: 100% !important;
    padding: 10px 15px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    background: var(--card-bg) !important;
    color: var(--primary-text) !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    height: auto !important;
    box-shadow: none !important;
}

#registration .jq-selectbox__trigger {
    border-left: none !important;
}

#registration .jq-selectbox__trigger-arrow {
    border-top-color: var(--primary-text) !important;
    top: 50% !important;
    transform: translateY(-50%);
    right: 15px !important;
}

#registration .form_group input[type="checkbox"]#register_agree+.jq-checkbox {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    box-shadow: none;
    vertical-align: middle;
}

#registration .form_group input[type="checkbox"]#register_agree+.jq-checkbox .jq-checkbox__div {
    background-color: var(--link-color);
    width: 10px;
    height: 10px;
    margin: 3px;
    border-radius: 2px;
}

#registration .form_group input[type="checkbox"]#register_agree:focus+.jq-checkbox {
    outline: none;
    box-shadow: none;
}

#registration .form_group label:has(+ input[type="checkbox"]#register_agree) {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
    font-weight: normal;
    font-size: 0.9rem;
}

#registration .form_group label a {
    color: var(--link-color);
    text-decoration: underline;
}

#registration .form_group label a:hover {
    color: var(--btn-main-hover-bg);
}

#registration #register_submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    height: 45px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    background: var(--btn-main-bg);
    color: var(--background);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    padding: 0 25px;
    margin-top: 15px;
    border: none;
}

#registration #register_submit:hover {
    background: var(--btn-main-hover-bg);
    color: var(--background);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#registration #register_submit:disabled {
    background: var(--secondary-text);
    color: var(--background);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#registration .form_group:has(> #register_submit) {
    text-align: center;
}

#registration .bottom_txt a {
    color: var(--link-color);
    transition: color 0.3s ease;
}

#registration .bottom_txt a:hover {
    color: var(--btn-main-hover-bg);
}

.flash-message-success {
    padding: 15px;
    margin: 20px auto;
    max-width: 80%;
    background-color: #e8f5e9;
    color: #2E7D32;
    transition: opacity 0.5s ease-out;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #a5d6a7;
    font-size: 1rem;
}

button[data-fancybox-close] {
    display: none !important;
}

#dialog-message {
    background-color: var(--background);
    color: var(--primary-text);
    padding: 30px 40px;
    border-radius: 15px;
    max-width: 550px;
    box-shadow: var(--old-shadow);
    text-align: left;
    border: 1px solid #dc3545;
}

#dialog-message h2 {
    color: #dc3545;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

#dialog-message p {
    color: var(--primary-text);
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
}

#dialog-message p:last-child {
    margin-bottom: 0;
}

#dialog-message strong.c_red {
    color: #dc3545;
    font-weight: bold;
}

#dialog-message.dialog-success h2 {
    color: var(--link-color);
}

#dialog-message.dialog-success {
    border: 1px solid var(--link-color);
}

#dialog-message.dialog-success .dialog-button-wrapper {
    text-align: center;
    margin-top: 20px;
}

#dialog-message.dialog-success .btn-success-dialog {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--btn-main-bg);
    color: var(--background);
    text-decoration: none;
    border-radius: 20px;
}

#dialog-message.dialog-success .btn-success-dialog:hover {
    background-color: var(--btn-main-hover-bg);
}

.credits-display {
    display: flex;
    align-items: center;
    margin-right: 10px;
    color: var(--primary-text);
    font-weight: 500;
    gap: 0px;
}

.credit-icon {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    vertical-align: middle;
    font-size: 18px;
    position: relative;
    top: 4px;
    color: #2E7D32;
}

.credit-count {
    font-size: 16px;
    vertical-align: middle;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip-window {
    visibility: hidden;
    width: 260px;
    background-color: var(--card-bg);
    color: var(--primary-text);
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    position: absolute;
    z-index: 100;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 14px;
    pointer-events: none;
    border: 1px solid var(--border-color);
}

.credits-display .tooltip .tooltip-window {
    width: 160px;
}

.tooltip:hover .tooltip-window {
    visibility: visible;
    opacity: 1;
}

.tooltip img {
    filter: drop-shadow(4px 8px 8px rgba(1, 21, 41, .8));
}

footer {
    background: var(--card-bg);
    color: var(--secondary-text);
    padding: 1.5rem 20px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-c {
    color: var(--secondary-text);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    transition: all 0.3s ease-in-out;
}

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

textarea.form_input {
  height: auto;
  min-height: 150px;
  resize: vertical;
}

/* Styles for the main title section */
.main-title-container {
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.main-title-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-text);
}

.main-title-content .subtitle {
    font-size: 1.25rem;
    color: var(--secondary-text);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Header adjustments */
.app-header {
    width: 100%;
    background: var(--background);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
    height: 70px;
}

.app-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.app-header .logo i { font-size: 1.5rem; color: var(--link-color); }
.app-header .logo h1 { font-size: 1.5rem; font-weight: 600; }

.app-header nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
    margin-right: 2rem;
}
.app-header nav a { text-decoration: none; color: var(--primary-text); font-weight: 500; transition: color 0.2s; font-size: 1rem; }
.app-header nav a:hover { color: var(--link-color); }

.app-header nav a.support-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}
.app-header nav a.support-link:hover { background-color: var(--border-color); }
.app-header nav a.support-link img { width: 20px; height: 20px; }


.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    background: var(--card-bg);
    color: var(--secondary-text);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    padding: 0 20px;
}
.btn-secondary:hover {
    background: var(--border-color);
    color: var(--primary-text);
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(36, 113, 163, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(36, 113, 163, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(36, 113, 163, 0);
    }
}

@media screen and (max-width: 1200px) {
    .content {
        width: 100%;
        padding: 2rem 40px;
    }
}

@media screen and (max-width: 768px) {
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-content > div:first-child {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-content > div:first-child > span[style] {
        display: none;
    }
}

@media screen and (max-width: 767px) {
    .content {
        padding: 2rem 20px;
    }
    
    .app-header {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        gap: 10px 15px;
        padding: 1rem 20px;
        position: static;
    }
    
    .app-header .logo {
        flex-basis: 100%;
        justify-content: center;
    }

    .app-header nav {
        margin: 0;
        order: 1;
    }

    .app-header .header-buttons {
        order: 2;
        width: auto;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 0;
        gap: 15px;
    }
    
    .app-header nav a.support-link span {
        display: none;
    }

    .main-title-container {
        padding: 2.5rem 20px;
    }

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

    .main-title-content .subtitle {
        font-size: 1.1rem;
    }

    .btn,
    .btn-secondary {
        width: auto;
        min-width: 140px;
        flex-grow: 1;
    }
    
    .header-buttons .btn,
    .header-buttons .btn-secondary {
        flex-grow: 1;
        width: auto;
    }
    
    .credits-display {
       margin-right: 0;
    }

    #login {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 30px 20px;
        box-shadow: none;
        border-radius: 0;
    }

    #registration {
        padding: 30px 20px;
        margin: 20px 0;
    }

    .form_wrap .form_actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .form_wrap .page_show {
        text-align: center;
        margin-left: 0;
    }

    .form_wrap .form_submit {
        width: 100%;
    }

    #registration #register_submit {
        width: 100%;
    }
    
    footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }
}