@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --telegram-blue: #0088cc;
    --telegram-blue-dark: #006ba6;
    --telegram-blue-light: #54a9eb;
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px 16px 0;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* Loading Spinner */
#loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.spinner-circle {
    width: 48px;
    height: 48px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--telegram-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.spinner-label {
    color: var(--gray-500);
    font-weight: 500;
}

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

/* Add top padding to main content to account for fixed header */


/* Main Content */
#app-container.original {
    display: none;
    width: 100%;
}

.hero-section {
    text-align: center;
    padding: 10px 0;
}

/* Profile Section */
.profile-container {
    margin-bottom: 12px;
}

.channel-avatar-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.channel-avatar-link:hover {
    transform: scale(1.05);
}

.avatar-wrapper {
  width: 120px;
  height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--telegram-blue), var(--telegram-blue-light));
    box-shadow: 0 8px 32px rgba(0, 136, 204, 0.25);
    position: relative;
    transition: all 0.3s ease;
}

.channel-avatar-link:hover .avatar-wrapper {
    box-shadow: 0 12px 48px rgba(0, 136, 204, 0.35);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Brand Title */
.brand-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    line-height: 1.2;
}

/* Info Card - Black text on white background as requested */
.info-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.feature-list {
    display: flex;
    flex-direction: column;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
  padding: 6px 0;
}

.feature-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.feature-label {
    color: var(--black);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

/* CTA Button - Large and pulsing */
.cta-container {
    margin: 16px 0;
}

.telegram-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--telegram-blue), var(--telegram-blue-dark));
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    padding: 18px 48px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 136, 204, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 280px;
}

.telegram-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 136, 204, 0.4);
    background: linear-gradient(135deg, var(--telegram-blue-light), var(--telegram-blue));
}

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

.telegram-logo {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Pulse animation for CTA button */
.pulse-animation {
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 136, 204, 0.3);
    }
    50% {
        box-shadow: 0 12px 40px rgba(0, 136, 204, 0.45);
    }
}

/* Footer */
.page-footer {
    margin-top: auto;
    padding: 32px 16px 20px;
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.footer-disclaimer {
    margin-bottom: 16px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--gray-500);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--telegram-blue);
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.consent-content {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.consent-message {
    color: var(--gray-700);
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.consent-link {
    color: var(--telegram-blue);
    text-decoration: none;
}

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

.consent-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.consent-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.accept-consent {
    background: var(--telegram-blue);
    color: var(--white);
}

.accept-consent:hover {
    background: var(--telegram-blue-dark);
}

.decline-consent {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.decline-consent:hover {
    background: var(--gray-200);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--gray-600);
    transition: all 0.2s ease;
    z-index: 2001;
}

.modal-close-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-content h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
    padding-top: 20px;
}

.modal-body {
    color: var(--gray-700);
    line-height: 1.6;
}

.modal-body h2 {
    color: var(--gray-900);
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-body a {
    color: var(--telegram-blue);
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 4px;
    z-index: 2001;
}

.language-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-btn.active {
    background: var(--telegram-blue);
    color: var(--white);
    border-color: var(--telegram-blue);
}

.language-btn:hover:not(.active) {
    background: var(--gray-200);
}

.language-content.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .app-wrapper {
        padding: 0px 12px 0;
    }

    .brand-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .info-card {
        padding: 20px;
        margin-bottom: 16px;
    }

    .feature-label {
        font-size: 15px;
    }

    .telegram-join-btn {
        font-size: 16px;
        padding: 16px 32px;
        min-width: 240px;
    }

    /* Cookie banner compact layout */
    .cookie-consent-banner {
        padding: 12px;
    }

    .consent-content {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        text-align: left;
    }

    .consent-message {
        flex: 1;
        font-size: 13px;
        line-height: 1.3;
    }

    .consent-buttons {
        flex-direction: column; /* Accept над Decline */
        gap: 6px;
        flex-shrink: 0;
        width: auto;
    }

    .consent-btn {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
        min-width: 70px;
    }

    /* Модалка: чуть компактнее на мобиле */
    .modal-content {
        padding: 24px;
        margin: 10px;
    }

    .modal-content h1 {
        font-size: 20px;
        padding-top: 16px;
    }
}


@media (min-width: 481px) and (max-width: 768px) {
    .brand-title {
        font-size: 30px;
    }
    
    .avatar-wrapper {
        width: 120px;
        height: 120px;
    }
}

/* Accessibility improvements */
.telegram-join-btn:focus,
.channel-avatar-link:focus {
    outline: 2px solid var(--telegram-blue);
    outline-offset: 2px;
}

.consent-btn:focus,
.footer-link:focus,
.modal-close-btn:focus {
    outline: 2px solid var(--telegram-blue);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .cookie-consent-banner,
    .modal-overlay {
        display: none !important;
    }
}
.tgme_head_wrap {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 54px;
  padding: 10px 16px;
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  z-index: 1200;
}
.tgme_head {
  display: flex;
  justify-content: space-between;
}
.tgme_head_brand {
  display: inline-block;
  vertical-align: top;
}

a.tgme_head_right_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--telegram-blue); /* однотонный фон */
  padding: 8px 16px;
  height: 34px;
  border-radius: 17px;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease;
  border: none;
}

a.tgme_head_right_btn:hover,
a.tgme_head_right_btn:active {
  background: var(--telegram-blue-dark); /* без тени и без движения */
}
.tgme_head_spacer {
  height: 59px; /* 54px высота шапки + 10px зазор */
}