/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
    --accent-gradient: linear-gradient(135deg, #10B981 0%, #00d68f 100%);
    --success-gradient: linear-gradient(135deg, #10B981 0%, #00d68f 100%);
    --warning-gradient: linear-gradient(135deg, #00ba78 0%, #00d68f 100%);
    --card-bg: #222222;
    --text-primary: #f0f0f0; /* Default light text color */
    --text-secondary: #aaaaaa; /* Secondary light text color */
    --border-color: #333333;
    --input-bg: #2b2b2b;
    --input-text: #ffffff;
    --input-placeholder: #a0a0a0;
    --nav-bg: rgba(20, 20, 20, 0.95);
    --nav-border: rgba(0, 186, 120, 0.1);
    --features-bg: #282828;
    --payment-bg: linear-gradient(135deg, rgba(28, 28, 28, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    --support-bg: linear-gradient(135deg, rgba(28, 28, 28, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    --primary-color: #10B981; /* Green color */
    --secondary-color: #1e40af;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b; /* Keep this for light theme default text */
    --nav-height: 64px;
    --bg-color: #1a1a1a;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--primary-gradient);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0; 
    color: var(--text-primary); /* Ensure body text is light */
    transition: background 0.5s ease;
    padding-top: 80px;
}

.container {
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    animation: fadeIn 0.8s ease-out;
    box-sizing: border-box; 
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    animation: slideUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
}

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

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

/* Фоновые эмодзи для всех баннеров */
.card::before,
.card::after {
    position: absolute;
    font-size: 3em;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
    content: "🗂️";
}
.card::before {
    top: 20px;
    left: 30px;
    transform: rotate(-8deg);
}
.card::after {
    bottom: 20px;
    right: 30px;
    transform: rotate(12deg);
}

/* Заголовки */
h1, h3 {
    color: var(--text-primary); /* Ensure headings are light */
    margin-bottom: 20px;
    font-size: 2.2em; 
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(0, 186, 120, 0.2);
    }
    50% {
        text-shadow: 0 0 30px rgba(0, 186, 120, 0.4);
    }
}

/* Описание на главной */
.description {
    font-size: 1.1em; 
    color: var(--text-secondary); /* Ensure description is light */
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Стили для контейнера с ключом */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

@media (min-width: 769px) {
    .main-content-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .main-content-wrapper > .features {
        flex: 1;
        margin: 0 15px;
    }

    .main-content-wrapper > .features:first-child {
        margin-left: 0;
    }

    .main-content-wrapper > .features:last-child {
        margin-right: 0;
    }
}

/* Общие стили для секций features */
.features {
    background: var(--features-bg);
    border-radius: 15px;
    padding: 25px;
    margin: 0;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.features:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.features::before,
.features::after {
    position: absolute;
    font-size: 2em;
    opacity: 0.08;
    transition: all 0.3s ease;
}

.features::before {
    content: "✨";
    top: 20px;
    right: 20px;
    transform: rotate(10deg);
}

.features::after {
    content: "🌟";
    bottom: 20px;
    left: 20px;
    transform: rotate(-10deg);
}

.features:hover::before,
.features:hover::after {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.15;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    padding: 12px 0;
    font-size: 1.05em;
    color: var(--text-secondary); /* Ensure list items are light */
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.features li:hover {
    color: var(--text-primary);
}

.features li::before {
    content: "→";
    margin-right: 10px;
    color: var(--primary-color); /* This should remain green */
    transition: transform 0.3s ease;
}

.features li:hover::before {
    transform: translateX(5px);
}

/* Цена */
.price {
    font-size: 3em;
    font-weight: bold;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 30px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: pricePulse 2s ease-in-out infinite;
}

/* Other textual elements to ensure visibility */
p, label, span, th, td {
    color: var(--text-primary); /* Default light text for these elements */
}

.links-table th, .links-table td {
    color: var(--text-primary);
}

.modal-content h3, .modal-content p {
    color: var(--text-primary);
}

.alert {
    color: var(--text-primary);
}

.stat-card h4 {
    color: var(--text-secondary);
}

.stat-number {
    color: var(--text-primary);
}

.key-display, .masked-key, .full-key {
    color: var(--text-primary);
}

.form-control {
    color: var(--input-text);
}

.form-control::placeholder {
    color: var(--input-placeholder) !important;
}

.link-url, .short-url {
    color: var(--text-secondary);
}

.nav-tab span {
    color: var(--text-secondary);
}

.dashboard-header h2 {
    color: var(--text-primary);
}

.user-info {
    color: var(--text-primary);
}

.review-text, .reviewer-name, .review-date {
    color: var(--text-secondary);
}

.payment-details p, .order-row span {
    color: var(--text-primary);
}

.guarantee p {
    color: var(--text-primary);
}

.support-section h3, .support-section p {
    color: var(--text-primary);
}

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

.empty-state h3, .empty-state p {
    color: var(--text-primary);
}

.updates-section h3, .update-content h4, .update-content p, .update-date {
    color: var(--text-primary);
}

/* Dark theme specific overrides - ensure these are light */
.dark-theme .form-group label {
    color: var(--text-primary);
}

.dark-theme .support-section h3,
.dark-theme .support-section p {
    color: var(--text-primary);
}

.dark-theme .support-note {
    color: var(--text-secondary);
}

.dark-theme .alert-danger {
    color: #ff6b6b !important; /* Keep red for danger */
}

.dark-theme .form-control {
    color: var(--input-text);
}

.dark-theme .form-control::placeholder {
    color: var(--input-placeholder) !important;
}

/* Стили для кнопок */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 186, 120, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 186, 120, 0.3);
}

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

.btn-support {
    background: linear-gradient(135deg, #0088cc 0%, #00a2ff 100%);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.btn-support:hover {
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.3);
}

.btn-login {
    background: linear-gradient(135deg, #00ba78 0%, #00d68f 100%);
    box-shadow: 0 4px 15px rgba(0, 186, 120, 0.2);
}

.btn-login:hover {
    box-shadow: 0 6px 20px rgba(0, 186, 120, 0.3);
}

/* Стили для полей ввода */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #00ba78;
    box-shadow: 0 0 0 2px rgba(0, 186, 120, 0.2);
}

.form-control::placeholder {
    color: var(--input-placeholder) !important;
}

/* Темная тема - Убедимся, что все переопределения корректны */
.dark-theme {
    background: var(--primary-gradient);
    color: var(--text-primary);
}

.dark-theme .card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.dark-theme .form-control {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color);
    color: var(--input-text) !important;
}

.dark-theme .form-control:focus {
    border-color: #00ba78;
    box-shadow: 0 0 0 2px rgba(0, 186, 120, 0.2);
}

.dark-theme .form-control::placeholder {
    color: var(--input-placeholder) !important;
}

.dark-theme .form-group label {
    color: var(--text-primary);
}

.dark-theme .support-section h3 {
    color: var(--text-primary);
}

.dark-theme .support-section p {
    color: var(--text-secondary);
}

.dark-theme .support-note {
    color: var(--text-secondary);
}

.dark-theme .alert-danger {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
}

@media (max-width: 768px) {
    html, body {
        height: auto; 
    }

    body {
        padding-bottom: 150px; /* Увеличиваем отступ снизу до 150px, чтобы учесть полную высоту навигации и нижние отступы элементов */
        padding-top: 10px; 
        overflow-y: auto; 
        min-height: auto; 
        display: block; /* Отменяем display: flex, чтобы padding-bottom работал корректно */
        flex-direction: unset; /* Отменяем flex-direction: column */
    }

    .container {
        padding-bottom: 0; 
        padding-top: 0; 
    }
    
    .navbar {
        position: fixed;
        bottom: 0;
        top: auto;
        width: 100%;
    }

    .container {
        padding: 0 10px;
    }
    .card {
        padding: 25px;
        margin: 10px auto;
    }
    h1 {
        font-size: 2em;
    }
    h3 {
        font-size: 1.3em;
    }
    .description {
        font-size: 1em;
    }
    .price {
        font-size: 2.5em;
    }
    .btn {
        padding: 12px 25px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px 0;
    }
    .container {
        padding: 0 5px;
    }
    .card {
        padding: 20px;
        border-radius: 10px;
    }
    h1 {
        font-size: 1.8em;
    }
    h3 {
        font-size: 1.2em;
    }
    .description {
        font-size: 0.9em;
    }
    .price {
        font-size: 2em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
        margin: 5px;
    }
    .form-group label {
        font-size: 0.9em;
    }
    .form-control {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    .note {
        font-size: 0.8em;
    }
}

.support-section {
    background: var(--support-bg);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.support-section h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.support-section p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.btn-support:hover {
    background: #0056b3;
}

.support-note {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 15px;
}

.back-to-home {
    margin-top: 20px;
}

.back-to-home .btn-secondary {
    margin: 0;
}

/* Дополнительные стили для login.php */
.login-card {
    max-width: 500px;
    margin: 50px auto;
}

.login-card h1 {
    font-size: 2.2em;
}

.login-form {
    margin-top: 20px;
}

/* Стили для отзывов */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.review-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    text-align: left;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.review-text {
    font-size: 1.1em;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.6;
    font-style: italic;
}

.reviewer-name {
    font-size: 1em;
    color: var(--text-secondary);
    margin-top: 10px;
}

.review-link, .reviewer-name-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.review-link:hover, .reviewer-name-link:hover {
    color: #00d68f;
}

.mobile-reviews-container {
    margin-top: 40px;
    padding: 20px;
}

.mobile-reviews-container h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5em;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .review-text {
        font-size: 1em;
    }
}

/* Стили для страницы оплаты */
.payment-details, .payment-info, .guarantee {
    background: var(--payment-bg);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.order-info {
    margin-top: 15px;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-row:last-child {
    border-bottom: none;
}

.order-row span:first-child {
    color: var(--text-secondary);
}

.order-row .price {
    font-size: 1.5em;
    margin: 0;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.payment-info {
    background: rgba(28, 28, 28, 0.6);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    text-align: center;
}

.payment-info p {
    margin: 10px 0;
    color: var(--text-secondary);
    font-size: 1.1em;
}

.payment-info p:first-child {
    color: var(--text-primary);
    font-size: 1.2em;
}

.btn-large {
    font-size: 1.2em;
    padding: 15px 40px;
    margin: 20px 0;
}

.back-link {
    margin: 20px 0;
    text-align: center;
}

.back-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #00d68f;
}

.guarantee {
    background: rgba(28, 28, 28, 0.6);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    text-align: center;
}

.guarantee p {
    margin: 10px 0;
    color: var(--text-secondary);
    font-size: 1.1em;
}

.guarantee p:first-child {
    color: var(--text-primary);
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .payment-details,
    .payment-info,
    .guarantee {
        padding: 20px;
    }

    .order-row {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    .btn-large {
        width: 100%;
        padding: 15px 20px;
    }
}

/* Навигационная панель */
.navbar {
    position: fixed;
    top: 0; /* Keep top:0 for desktop */
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s ease;
}

.nav-brand a:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.1em;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 186, 120, 0.1);
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(0, 186, 120, 0.2);
}

.support-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 186, 120, 0.1);
    color: #00d68f;
}

.support-link:hover {
    background: rgba(0, 186, 120, 0.2);
    color: #00d68f;
}

.telegram-icon {
    font-size: 1.2em;
}

/* Обновляем стили для мобильных устройств */
@media (max-width: 768px) {
    .navbar {
        top: auto; /* Override top for mobile */
        bottom: 0; /* Position at bottom for mobile */
        border-top: 1px solid var(--nav-border); /* Add top border for bottom nav */
        border-bottom: none; /* Remove bottom border */
        padding: 10px 0; /* Adjust padding for bottom nav */
    }

    .nav-container {
        flex-direction: row; /* Ensure horizontal layout */
        justify-content: space-around; /* Distribute items evenly */
        padding: 0 10px; /* Adjust padding */
    }

    .nav-brand {
        display: none; /* Hide brand logo on mobile bottom nav */
    }

    .nav-links {
        display: flex; /* Always visible on mobile */
        flex-wrap: nowrap; /* Prevent wrapping */
        gap: 0; /* No gap between items */
        width: 100%; /* Take full width */
        justify-content: space-around; /* Distribute items evenly */
    }

    .nav-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.75em; /* Smaller font for tabs */
        padding: 8px 0; /* Adjust padding for tabs */
        color: var(--text-secondary);
        text-align: center;
        border-radius: 0; /* No border radius for tabs */
        background: none; /* No background for tabs */
    }

    .nav-link:hover {
        color: #00d68f;
        background: none; /* No background on hover */
    }

    .nav-link.active {
        color: #00d68f;
        position: relative;
    }

    .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 3px;
        background: var(--accent-gradient);
        border-radius: 3px 3px 0 0;
    }

    .nav-link .telegram-icon {
        font-size: 1.5em; /* Larger icon */
        margin-bottom: 4px;
    }

    /* Remove menu-toggle related styles */
    .menu-toggle {
        display: none !important;
    }
}

/* Ensure menu-toggle is always hidden on desktop */
.menu-toggle {
    display: none !important;
}

/* Стили для страницы успешной оплаты */
.success-card {
    text-align: center;
    max-width: 800px;
    margin: 40px auto;
}

.success-icon {
    font-size: 3em;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.key-container {
    background: var(--features-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#access-key {
    font-size: 1.5em;
    font-family: monospace;
    color: #00d68f;
    background: rgba(0, 186, 120, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    letter-spacing: 2px;
}

.btn-copy {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: rgba(0, 186, 120, 0.1);
    transform: scale(1.1);
}

.notification {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) scale(0.98);
    background: linear-gradient(90deg, #10B981 0%, #00d68f 100%);
    color: #fff;
    padding: 18px 38px;
    border-radius: 14px;
    border: none;
    animation: slideUpFade 0.5s cubic-bezier(.4,0,.2,1), notificationFade 3.2s cubic-bezier(.4,0,.2,1) forwards;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(16,185,129,0.18), 0 2px 8px rgba(0,0,0,0.10);
    font-size: 1.13em;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0;
    pointer-events: none;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes notificationFade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--border-color);
    animation: modalSlideUp 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    color: var(--text-primary);
}

.modal-content p {
    font-size: 1em;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox:checked {
    background: var(--accent-gradient);
    border-color: transparent;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-buttons .btn {
    min-width: 120px;
}

/* Адаптивность для страницы успеха */
@media (max-width: 768px) {
    .success-card {
        margin: 20px auto;
        padding: 20px;
    }

    .key-container {
        flex-direction: column;
        padding: 15px;
    }

    #access-key {
        font-size: 1.2em;
        padding: 8px 15px;
    }

    .modal-content {
        padding: 20px;
    }

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

    .modal-buttons .btn {
        width: 100%;
    }
}

/* Добавляем эффект свечения при наведении */
.card:hover, .features:hover, .payment-details:hover, .payment-info:hover, .guarantee:hover, .support-section:hover {
    box-shadow: 0 10px 30px rgba(0, 186, 120, 0.1);
}

/* Добавляем градиентную анимацию для фона */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.card, .features, .payment-details, .payment-info, .guarantee, .support-section {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Обновляем стили для отзывов */
.reviews-section {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.review {
    background: var(--features-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.review:hover {
    transform: translateX(-5px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.review-author {
    font-weight: 600;
    color: var(--text-primary);
}

.review-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.review-content {
    color: var(--text-primary);
    line-height: 1.5;
}

/* Адаптивность для отзывов */
@media (max-width: 1400px) {
    .reviews-section {
        position: static;
        transform: none;
        width: 100%;
        max-width: 800px;
        margin: 20px auto;
        max-height: none;
    }
}

/* Обновляем стили для контейнера */
.container {
    display: flex;
    gap: 20px;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.main-content {
    flex: 1;
    max-width: 1200px;
}

/* Стили для скроллбара в секции отзывов */
.reviews-section::-webkit-scrollbar {
    width: 8px;
}

.reviews-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.reviews-section::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 4px;
}

.reviews-section::-webkit-scrollbar-thumb:hover {
    background-color: #00ba78;
}

/* New styles for main layout */
.main-layout-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 30px; /* Space between the two columns */
    margin-top: 20px;
}

.main-content {
    flex: 2; /* Takes more space */
    min-width: 300px; /* Minimum width for main content */
    max-width: 800px;
    margin: 0; /* Remove default margin */
}

.mobile-reviews-container {
    flex: 1; /* Takes less space */
    min-width: 300px; /* Minimum width for reviews */
    max-width: 400px;
    margin: 0; /* Remove default margin */
}

@media (min-width: 1024px) {
    .main-layout-container {
        justify-content: space-between; /* Distribute space on larger screens */
    }
}

@media (max-width: 768px) {
    .main-layout-container {
        flex-direction: column; /* Stack columns on smaller screens */
        align-items: center;
    }

    .main-content, .mobile-reviews-container {
        width: 100%;
        max-width: none;
    }
}

.dashboard {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: var(--nav-height);
    border: 1px solid var(--border-color);
}

.dashboard-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--features-bg);
    border-radius: 16px 16px 0 0;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--accent-gradient);
    color: white;
}

.btn-secondary {
    background: var(--features-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(0, 186, 120, 0.1);
}

.dashboard-content {
    padding: 20px;
    flex: 1;
}

.stats-section {
    margin-bottom: 24px;
}

.stats-section h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--features-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 186, 120, 0.1);
}

.stat-card h4 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--nav-border);
    height: var(--nav-height);
    z-index: 1000;
}

.nav-tabs {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    height: 100%;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
    padding: 8px;
}

.nav-tab svg {
    margin-bottom: 4px;
    stroke: currentColor;
}

.nav-tab span {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-tab.active {
    color: #00d68f;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px 3px 0 0;
}

.nav-tab:hover {
    color: #00d68f;
    background: rgba(0, 186, 120, 0.05);
}

@media (max-width: 640px) {
    .container {
        padding: 12px;
    }
    
    .dashboard {
        border-radius: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tab span {
        font-size: 0.7rem;
    }
}

/* Key Display Styles */
.key-display {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(0, 186, 120, 0.05);
    border: 1px solid var(--border-color);
}

.key-display:hover {
    background: rgba(0, 186, 120, 0.1);
}

.masked-key, .full-key {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-primary);
}

/* Checkbox Styles */
.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--accent-gradient);
    border-color: transparent;
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-text {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.checkbox-label:hover input[type="checkbox"] {
    border-color: #00d68f;
}

/* Стили для страницы ссылок */
.links-section {
    padding: 20px;
}

.action-bar {
    margin-bottom: 20px;
}

.links-list {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 500;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Стили для страницы статистики */
.stats-section {
    padding: 20px;
}

.time-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.time-filter .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
}

.stat-card h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.stat-trend.up {
    color: #10b981;
}

.stat-trend.down {
    color: #ef4444;
}

.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Force square aspect ratio */
    max-height: 400px; /* Limit max height for larger screens */
    max-width: 600px;
    min-width: 300px;
}

.chart-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary); /* Ensure title is readable */
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    /* Removed max-width and max-height to allow full flexible scaling within the square container */
}

/* Specific style for Chart.js legend */
ul.chartjs-legend {
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

.chartjs-legend li {
    display: flex; /* Make it a flex container to better manage content */
    align-items: center; /* Vertically align items within the legend item */
    justify-content: flex-start; /* Align content to the start */
    overflow: visible !important;
    white-space: normal !important;
    word-break: break-all !important;
    max-width: 320px;
}

.chartjs-legend li span {
    color: var(--text-primary) !important;
    word-break: break-all !important;
    overflow: visible !important;
    text-overflow: initial !important;
    max-width: none !important;
}

/* Стили для страницы настроек */
.settings-section {
    padding: 20px;
}

.settings-group {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-group h3 {
    margin: 0 0 20px;
    font-size: 16px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item label {
    font-size: 14px;
}

.settings-key {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

.theme-switch {
    display: flex;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + label:before {
    transform: translateX(20px);
}

/* Стили для таблицы ссылок */
.links-table {
    width: 100%;
    overflow-x: auto;
}

.links-table table {
    width: 100%;
    border-collapse: collapse;
}

.links-table th,
.links-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.links-table th {
    background-color: #2b2b2b;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.link-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.link-title {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--primary-color); /* Green for link title */
}

.link-url {
    font-size: 0.9rem;
    color: var(--text-secondary); /* Light text for URL itself */
    word-break: break-all;
}

.link-url a {
    color: var(--primary-color); /* Green for actual link */
    text-decoration: none;
}

.link-url a:hover {
    text-decoration: underline;
}

.short-url {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.short-link {
    color: var(--text-secondary);
    text-decoration: none;
}

.short-link:hover {
    text-decoration: underline;
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* Стили для уведомлений */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 1.05em;
    color: var(--text-primary);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Statistics Styles */
.stats-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.link-filter {
    min-width: 200px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem; /* Ensure consistent spacing */
    margin-top: 2rem;
}

.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Force square aspect ratio */
    max-height: 400px; /* Limit max height for larger screens without squashing */
}

.chart-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary); /* Ensure title is readable */
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    /* Removed max-width and max-height to allow full flexible scaling within the square container */
}

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

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.stat-trend.up {
    color: #4CAF50;
}

.stat-trend.down {
    color: #f44336;
}

.time-filter {
    display: flex;
    gap: 0.5rem;
}

.time-filter .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

@media (max-width: 768px) {
    .stats-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .link-filter {
        width: 100%;
    }

    .time-filter {
        width: 100%;
        justify-content: space-between;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Chart Container */
.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 300px;
}

.chart-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Data Cards */
.data-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Links List */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    gap: 1rem;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.link-url {
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-all;
}

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

.link-url a:hover {
    text-decoration: underline;
}

.link-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

/* Countries List */
.countries-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
}

.country-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.country-flag {
    border-radius: 2px;
}

.country-stats {
    display: flex;
    gap: 1rem;
}

/* Stats */
.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.stat .label {
    color: var(--text-secondary);
}

.stat .value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .link-item {
        flex-direction: column;
    }

    .link-stats {
        width: 100%;
        min-width: 0;
    }

    .country-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .country-stats {
        width: 100%;
        justify-content: space-between;
    }
}

/* Updates Section */
.updates-section {
    margin-top: 30px;
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.updates-section h3 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid #10B981 !important;
}

.no-updates {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-style: italic;
}

.update-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.update-content h4 {
    color: #10B981;
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.update-content p {
    color: #10B981;
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
}

.update-date {
    color: var(--text-secondary);
    font-size: 12px;
}

.update-actions {
    display: flex;
    justify-content: flex-end;
}

.update-actions .btn-danger {
    padding: 8px 16px;
    font-size: 14px;
}

.form-text {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Chart specific adjustments */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem; /* Ensure consistent spacing */
    margin-top: 2rem;
}

.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Force square aspect ratio */
    max-height: 400px; /* Limit max height for larger screens */
}

.chart-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary); /* Ensure title is readable */
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    /* Removed max-width and max-height to allow full flexible scaling within the square container */
}

/* Specific style for Chart.js legend text */
.chartjs-legend li,
.chartjs-legend li span {
    color: var(--text-primary) !important; /* Ensure legend text is readable on dark background */
}

/* Обновляем стили для эмодзи */
[class*="emoji"], 
[class*="emoji"] *,
span[class*="emoji"],
span[class*="emoji"] *,
.emoji,
.emoji * {
    color: initial !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    text-shadow: none !important;
}

/* Правило для всех эмодзи в тексте */
*:not(button):not(input):not(textarea) {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji";
}

/* Добавляем специфичное правило для эмодзи в заголовках */
h1 emoji, h3 emoji, .title emoji {
    color: initial !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    text-shadow: none !important;
}

/* Специальные правила для конкретных эмодзи */
[data-emoji="💳"],
[data-emoji="📝"],
[data-emoji="⏰"],
[data-emoji="✨"],
[data-emoji="💬"],
[data-emoji="🔑"],
[data-emoji="⚠️"],
span[data-emoji="💳"],
span[data-emoji="📝"],
span[data-emoji="⏰"],
span[data-emoji="✨"],
span[data-emoji="💬"],
span[data-emoji="🔑"],
span[data-emoji="⚠️"] {
    color: initial !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    text-shadow: none !important;
    font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji" !important;
}

/* Стили для кнопок оплаты */
.payment-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.payment-buttons .btn {
    flex: 1;
    max-width: 300px;
}

@media (max-width: 768px) {
    .payment-buttons {
        flex-direction: column;
    }
    
    .payment-buttons .btn {
        width: 100%;
        max-width: none;
    }
}

/* Фоновые эмодзи для всех баннеров */
.payment-details::before,
.payment-details::after {
    position: absolute;
    font-size: 3em;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
    content: "💳";
}
.payment-details::before {
    top: 15px;
    left: 25px;
    transform: rotate(-8deg);
}
.payment-details::after {
    bottom: 15px;
    right: 25px;
    transform: rotate(12deg);
}

.payment-info::before,
.payment-info::after {
    position: absolute;
    font-size: 2.5em;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
    content: "🔒";
}
.payment-info::before {
    top: 10px;
    right: 20px;
    transform: rotate(8deg);
}
.payment-info::after {
    bottom: 10px;
    left: 20px;
    transform: rotate(-8deg);
}

.guarantee::before,
.guarantee::after {
    position: absolute;
    font-size: 2.5em;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
    content: "🛡️";
}
.guarantee::before {
    top: 10px;
    left: 20px;
    transform: rotate(-10deg);
}
.guarantee::after {
    bottom: 10px;
    right: 20px;
    transform: rotate(10deg);
}

.support-section::before,
.support-section::after {
    position: absolute;
    font-size: 2.5em;
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
    content: "💬";
}
.support-section::before {
    top: 10px;
    right: 20px;
    transform: rotate(8deg);
}
.support-section::after {
    bottom: 10px;
    left: 20px;
    transform: rotate(-8deg);
}

/* Стили для модального окна выбора домена (links.php) */
.domain-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(20,20,20,0.70);
    align-items: center; justify-content: center;
    animation: fadeInBg 0.5s cubic-bezier(.4,0,.2,1);
    backdrop-filter: blur(4px);
    transition: background 0.4s;
}

/* Стили для нового модального окна QR-кода */
.qr-modal-body {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.qr-code-container {
    border: 1px solid #444;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0; /* Зададим фон самому контейнеру */
}

.qr-code-container canvas {
    border-radius: 6px;
}


.qr-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    width: 240px;
}

.qr-controls .form-group {
    width: 100%;
}

.qr-controls label {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 5px;
}

.qr-controls .form-control {
    width: 100%;
    padding: 8px 12px;
}

.qr-link {
    font-family: 'Inter', sans-serif;
    color: #10B981;
    background-color: #2c2c38;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    word-break: break-all;
    text-align: center;
    border: 1px solid #444;
}

#downloadQrBtn {
    width: 100%;
    transition: background-color 0.2s, transform 0.2s;
}

#downloadQrBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons form {
    margin: 0;
}

.domain-modal-content {
    background: var(--card-bg, #23272f);
    color: #fff;
    border-radius: 22px;
    padding: 44px 32px 32px 32px;
    min-width: 340px;
    box-shadow: 0 12px 40px 0 rgba(0,0,0,0.32), 0 1.5px 8px 0 rgba(16,185,129,0.10);
    animation: scaleInSoft 0.45s cubic-bezier(.4,0,.2,1);
    position: relative;
    text-align: center;
    transition: box-shadow 0.3s, background 0.3s, transform 0.35s cubic-bezier(.4,0,.2,1), opacity 0.35s cubic-bezier(.4,0,.2,1);
}
.domain-modal-content.closing {
    animation: scaleOutSoft 0.38s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes scaleOutSoft {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.85); opacity: 0; }
}
.close-domain-modal {
    position: absolute;
    right: 18px; top: 12px;
    font-size: 2em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}
.close-domain-modal:hover {
    color: #fff;
    transform: rotate(90deg) scale(1.15);
}
.domain-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 28px 0 14px 0;
}
.domain-list button, .domain-list a {
    background: linear-gradient(90deg, #10B981 0%, #00d68f 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px 0;
    font-size: 1.15em;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(.4,0,.2,1), box-shadow 0.22s, background 0.22s;
    box-shadow: 0 2px 12px rgba(16,185,129,0.10);
    text-decoration: none;
    display: block;
    outline: none;
}
.domain-list button:hover, .domain-list a:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 8px 24px rgba(16,185,129,0.18);
    background: linear-gradient(90deg, #00d68f 0%, #10B981 100%);
}
.domain-list .copied {
    background: #00ba78 !important;
    color: #fff;
    animation: copiedAnim 0.7s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeInBg {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleInSoft {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes copiedAnim {
    0% { background: #00ba78; }
    100% { background: #10B981; }
}
.modal-alias {
    margin-top: 12px;
    color: #aaa;
    font-size: 1em;
    text-align: center;
    letter-spacing: 0.02em;
}
.modal-notify {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    background: #00ba78;
    color: #fff;
    border-radius: 10px;
    padding: 10px 28px;
    font-size: 1.08em;
    box-shadow: 0 2px 12px rgba(16,185,129,0.18);
    opacity: 0;
    pointer-events: none;
    animation: notifyFade 2.2s cubic-bezier(.4,0,.2,1) forwards;
    transition: opacity 0.3s;
}
@keyframes notifyFade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.promo-banner {
    margin: 28px 0 0 0;
    display: flex;
    justify-content: center;
    animation: promoFadeIn 1.2s cubic-bezier(.4,0,.2,1);
}
@keyframes promoFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.promo-banner-content {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(90deg, #23272f 60%, #10B981 100%);
    background-size: 200% 100%;
    background-position: 0% 0%;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(16,185,129,0.10);
    padding: 18px 24px;
    transition: box-shadow 0.22s, transform 0.18s, background-position 0.7s cubic-bezier(.4,0,.2,1), background 0.7s cubic-bezier(.4,0,.2,1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    color: #fff;
}
.promo-banner-link {
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 420px;
}
.promo-banner-link:hover .promo-banner-content {
    box-shadow: 0 12px 40px 0 rgba(16,185,129,0.22), 0 2px 8px rgba(0,0,0,0.10);
    transform: translateY(-2px) scale(1.035);
    background-position: 100% 0%;
}
.promo-banner-title {
    font-weight: 600;
    font-size: 1.13em;
    color: #10B981;
    letter-spacing: 0.01em;
}
.promo-banner-desc {
    color: #fff;
    font-size: 0.98em;
    opacity: 0.92;
}
.promo-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #fff;
}
.promo-banner-arrow {
    font-size: 1.5em;
    color: #10B981;
    margin-left: 8px;
    transition: transform 0.18s, color 0.3s;
}
.promo-banner-link:hover .promo-banner-arrow {
    transform: translateX(12px) scale(1.18);
    color: #00d68f;
}
.promo-banner-icon {
    font-size: 2.1em;
    background: linear-gradient(90deg, #10B981 0%, #00d68f 100%);
    border-radius: 50%;
    padding: 8px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(16,185,129,0.10);
    filter: drop-shadow(0 0 8px #10B98188);
    transition: filter 0.4s;
}
.promo-banner-link:hover .promo-banner-icon {
    filter: drop-shadow(0 0 18px #10B981cc);
}
@media (max-width: 600px) {
    .promo-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 12px;
    }
    .promo-banner-link {
        max-width: 98vw;
    }
}

.modal-domain-info {
    margin-top: 8px;
    color: #8fffd1;
    font-size: 0.98em;
    text-align: center;
    opacity: 0.85;
    letter-spacing: 0.01em;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.modal-domain-info b {
    color: #10B981;
    font-weight: 600;
}

.modal-domain-link {
    color: #10B981;
    text-decoration: none;
    transition: color 0.2s, text-decoration 0.2s;
}
.modal-domain-link:hover {
    color: #00d68f;
    text-decoration: underline;
}

.tg-bot-alert {
    background: linear-gradient(90deg, #23272f 60%, #10B981 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(16,185,129,0.10);
    padding: 18px 24px 18px 24px;
    margin-bottom: 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: tgBotAlertFadeIn 0.7s cubic-bezier(.4,0,.2,1);
}
@keyframes tgBotAlertFadeIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.tg-bot-alert-title {
    font-weight: 600;
    font-size: 1.13em;
    color: #10B981;
    letter-spacing: 0.01em;
    margin-bottom: 2px;
}
.tg-bot-alert-desc {
    color: #fff;
    font-size: 0.98em;
    opacity: 0.93;
    line-height: 1.5;
}
.tg-bot-alert-link {
    color: #10B981;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, text-decoration 0.2s;
}
.tg-bot-alert-link:hover {
    color: #00d68f;
    text-decoration: underline;
}
.tg-bot-alert-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    padding: 0 6px;
    line-height: 1;
}
.tg-bot-alert-close:hover {
    opacity: 1;
    color: #10B981;
}
@media (max-width: 600px) {
    .tg-bot-alert {
        padding: 12px 8px 12px 12px;
        font-size: 0.98em;
    }
    .tg-bot-alert-close {
        top: 6px;
        right: 8px;
    }
}

/* ... existing code ... */
@media (max-width: 600px) {
    .tg-bot-alert {
        flex-direction: column;
        align-items: flex-start;
    }
    .tg-bot-alert-close {
        top: 8px;
        right: 8px;
    }
}

/* Settings Page Tabs */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.settings-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.settings-tab:hover {
    color: var(--text-primary);
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.api-example {
    margin-bottom: 24px;
}

.api-example h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.api-example pre {
    background: #181c1f;
    color: #b6eada;
    padding: 16px 18px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.api-info {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.api-info h4 {
    color: #10B981;
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.api-info ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.api-info li {
    margin-bottom: 4px;
}

.api-info code {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}