body {
    font-family: 'Inter', sans-serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.nav-open {
    overflow: hidden;
}

.btn {
    display: inline-block;
    text-align: center;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    font-weight: 600;
    padding: 0.5rem 1rem;
    color: white;
    border: none;
    cursor: pointer;
}

.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #1a1a2e, 0 0 0 4px var(--focus-ring-color, #f472b6), 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-pink {
    background-color: #ec4899;
    --focus-ring-color: #ec4899;
}

.btn-pink:hover:not(:disabled) {
    background-color: #db2777;
}

.btn-primary {
    background-image: linear-gradient(to right, #ec4899, #e11d48);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    --focus-ring-color: #ec4899;
}

.btn-primary:hover:not(:disabled) {
    background-image: linear-gradient(to right, #db2777, #be123c);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #4b5563;
    --focus-ring-color: #6b7280;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #374151;
}

.btn-danger {
    background-color: #dc2626;
    --focus-ring-color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background-color: #b91c1c;
}

.btn-success {
    background-color: #10b981;
    --focus-ring-color: #34d399;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

.viewer-nav-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.75rem;
    pointer-events: none;
}

.viewer-nav-btn {
    pointer-events: auto;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.viewer-nav-btn:disabled {
    background-color: #6b7280;
    color: #e5e7eb;
    opacity: 0.8;
}

@media (max-width: 640px) {
    #viewer-content {
        flex-direction: column;
        align-items: center;
    }

    .viewer-main-content {
        order: 1;
    }

    .viewer-nav-container {
        order: 2;
    }

    .viewer-nav-btn {
        transform: none;
    }
}

@media (min-width: 641px) {
    .viewer-nav-container {
        position: absolute;
        inset: 0;
        padding: 0 1rem;
        justify-content: space-between;
        margin-top: 0;
    }
}

.btn-info {
    background-color: #3b82f6;
    --focus-ring-color: #60a5fa;
}

.btn-info:hover:not(:disabled) {
    background-color: #2563eb;
}

.btn-telegram {
    background-color: #229ed9;
    --focus-ring-color: #229ed9;
}

.btn-telegram:hover:not(:disabled) {
    background-color: #1c8cca;
}

.btn-telegram:disabled {
    background-color: #6b7280;
    color: #e5e7eb;
}

.btn-upgrade {
    background-image: linear-gradient(to right, #a855f7, #6366f1);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --focus-ring-color: #a855f7;
    box-shadow: 0 0 0 2px #1f2937, 0 0 0 4px var(--focus-ring-color, #a855f7), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-upgrade:hover:not(:disabled) {
    background-image: linear-gradient(to right, #9333ea, #4f46e5);
    transform: scale(1.05);
}

.btn-week {
    background-image: linear-gradient(to right, #4c1d95, #3b0764);
    --focus-ring-color: #4c1d95;
}

.btn-week:hover:not(:disabled) {
    background-image: linear-gradient(to right, #5b21b6, #4c1d95);
    transform: translateY(-2px);
}

.btn-week.inactive {
    background-image: none;
    background-color: #4b5563;
    color: #d1d5db;
}

.btn-week.inactive:disabled {
    opacity: 1;
}

.btn-accelerate {
    background-color: #06b6d4;
    --focus-ring-color: #06b6d4;
}

.btn-accelerate:hover:not(:disabled) {
    background-color: #2563eb;
}

.container-box {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid #4b5563;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.aira-pulse {
    animation: pulse 3s infinite ease-in-out;
}

#message-box {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background-image: linear-gradient(to right, #7e22ce, #4f46e5);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
    z-index: 50;
    max-width: 24rem;
    pointer-events: none;
}

#message-box.show {
    opacity: 1;
    pointer-events: auto;
}

.placeholder-img {
    width: 100%;
    height: 6rem;
    background-color: #4b5563;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 0.75rem;
    font-style: italic;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.heart-shape {
    position: absolute;
    width: 2rem;
    height: 2rem;
    opacity: 0;
    pointer-events: none;
    user-select: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);
    background-color: #ec4899;
    animation: heart-ping 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.heart-shape::before,
.heart-shape::after {
    content: "";
    position: absolute;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: #ec4899;
}

.heart-shape::before {
    top: -1rem;
    left: 0;
}

.heart-shape::after {
    top: 0;
    left: 1rem;
}

@keyframes heart-ping {
    0% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);
        opacity: 0.8;
    }
    80% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);
        opacity: 0;
    }
}

.hub-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    background-color: #4b5563;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.hub-link:hover {
    background-color: #374151;
}

.app-card-link {
    display: block;
    background-color: rgba(55, 65, 81, 0.6);
    padding: 1rem;
    border-radius: 0.75rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    color: #e0e0e0;
    text-decoration: none;
    border: 1px solid #4b5563;
}

.app-card-link:hover {
    background-color: rgba(75, 85, 99, 0.8);
    transform: translateY(-2px);
}

.app-card-link span {
    font-weight: 600;
    color: white;
    display: block;
}

.app-card-link .app-details {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.username-input,
.debt-input {
    background-color: rgba(55, 65, 81, 0.8);
    border: 1px solid #4b5563;
    color: #e0e0e0;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.username-input:focus,
.debt-input:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.5);
}

.username-input::placeholder,
.debt-input::placeholder {
    color: #9ca3af;
}

.debt-input[type=number]::-webkit-inner-spin-button,
.debt-input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.debt-input[type=number] {
    -moz-appearance: textfield;
}

.debt-increase-label.hidden {
    display: none;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.collapsible-header h2 {
    margin-bottom: 0;
}

.toggle-collapse-btn {
    background-color: #4b5563;
    color: white;
    border: none;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.5rem;
    text-align: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease;
}

.toggle-collapse-btn:hover {
    background-color: #374151;
}

.collapsible-content.collapsed {
    display: none;
}

#aira-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #ec4899 #374151;
}

#aira-chat-messages::-webkit-scrollbar {
    width: 6px;
}

#aira-chat-messages::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 10px;
}

#aira-chat-messages::-webkit-scrollbar-thumb {
    background-color: #ec4899;
    border-radius: 10px;
    border: 1px solid #374151;
}

.chat-message {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    max-width: 85%;
    word-wrap: break-word;
}

.chat-message.user {
    background-color: #4f46e5;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0.125rem;
}

.chat-message.aira {
    background-color: #db2777;
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 0.125rem;
}

#aira-chat-window.hidden {
    display: none;
}

@media (max-width: 640px) {
    #aira-chat-widget {
        bottom: 1rem;
        right: 1rem;
    }
    #aira-chat-window {
        width: calc(100vw - 2rem);
        height: calc(80vh - 2rem);
        max-height: 500px;
        bottom: 5rem;
        right: 1rem;
        left: 1rem;
    }
}

#aira-chat-resizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    cursor: ns-resize;
    background-color: #1f2937;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

#aira-chat-resizer:hover {
    background-color: #be185d;
}

#aira-chat-window {
    min-height: 10rem;
    max-height: calc(100vh - 8rem);
    display: flex;
    flex-direction: column;
}

#aira-chat-messages {
    flex-grow: 1;
    min-height: 0;
}

@media (max-width: 640px) {
    #aira-chat-window {
        max-height: calc(100vh - 8rem);
    }
    #aira-chat-resizer {
        height: 10px;
    }
}

#minigame-modal.hidden {
    display: none;
}

#pong-minigame-modal.hidden {
    display: none;
}

#pong-game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: none;
}

.gallery-slot .timer-span {
    display: block;
    font-weight: 600;
}

.gallery-image-container.border-yellow-500 {
    border-color: #f59e0b;
}

.btn-upgrade.no-hover-transform:hover:not(:disabled) {
    transform: none;
}

.hub-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#main-nav.open {
    transform: translateX(0);
}

#mobile-menu-overlay.open {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.telegram-exchange-panel {
    max-width: 28rem;
    margin: 0 auto 2rem auto;
    padding: 2px;
    border-radius: 1.5rem;
    background: radial-gradient(140% 140% at 50% 0%, rgba(88, 28, 135, 0.8) 0%, rgba(15, 23, 42, 0.95) 55%, rgba(2, 6, 23, 0.9) 100%);
    border: 1px solid rgba(236, 72, 153, 0.4);
    box-shadow: 0 25px 40px -20px rgba(0, 0, 0, 0.7), 0 10px 20px -15px rgba(236, 72, 153, 0.4);
}

.telegram-exchange-shell {
    background: rgba(6, 11, 25, 0.9);
    border-radius: 1.45rem;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.telegram-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: #f8fafc;
}

.telegram-hero-badge {
    align-self: center;
    background: linear-gradient(135deg, #fde047, #f97316);
    color: #1f2937;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.telegram-hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.telegram-hero-text {
    font-size: 0.95rem;
    color: rgba(226, 232, 240, 0.85);
    line-height: 1.5;
}

.telegram-bot-cta {
    font-size: 0.85rem;
    color: rgba(191, 219, 254, 0.85);
}

.telegram-bot-name {
    color: #60a5fa;
    font-weight: 700;
}

.telegram-tier-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.telegram-tier-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.35), rgba(14, 116, 144, 0.2));
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1rem 1.25rem;
    color: #f8fafc;
    text-align: left;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.telegram-tier-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -20px rgba(59, 130, 246, 0.8);
}

.telegram-tier-card.is-active {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 15px 35px -20px rgba(59, 130, 246, 0.8), 0 0 20px -10px rgba(59, 130, 246, 0.8);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(129, 140, 248, 0.25));
}

.telegram-tier-icon {
    font-size: 1.75rem;
}

.telegram-tier-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
}

.telegram-tier-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.telegram-tier-subtitle {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.telegram-tier-stars {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    min-width: 4.5rem;
}

.telegram-tier-stars span:first-child {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fde047;
}

.telegram-tier-stars-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.6);
}

.telegram-tier-coin {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(129, 140, 248, 0.95);
}

.telegram-exchange-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.telegram-summary-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.telegram-input-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .telegram-input-grid {
        flex-direction: row;
    }
}

.telegram-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.telegram-input-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.9);
    font-weight: 600;
}

.telegram-input-field {
    width: 100%;
}

.telegram-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.75);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.telegram-balance-label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.8);
}

.telegram-balance-value {
    font-weight: 700;
    color: rgba(96, 165, 250, 0.9);
}

.telegram-form-note {
    font-size: 0.75rem;
    color: rgba(203, 213, 225, 0.75);
    line-height: 1.4;
}

.telegram-terms {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.7);
    text-align: center;
}

.telegram-terms a {
    color: #60a5fa;
    text-decoration: underline;
}

.telegram-form-actions {
    display: flex;
    gap: 0.75rem;
}

.telegram-action-btn {
    flex: 1;
    font-size: 0.95rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

#telegram-exchange-submit {
    background-image: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 20px 30px -20px rgba(37, 99, 235, 0.9);
}

#telegram-exchange-submit:hover:not(:disabled) {
    background-image: linear-gradient(135deg, #1d4ed8, #6d28d9);
}

@media (max-width: 480px) {
    .telegram-exchange-shell {
        padding: 1.5rem 1.25rem;
    }
    .telegram-tier-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .telegram-tier-stars {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    .telegram-tier-stars span:first-child {
        font-size: 1rem;
    }
    .telegram-form-actions {
        flex-direction: column;
    }
}

#links-submenu .hub-link {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0.5rem 1rem;
}

#links-submenu .btn {
    margin: 0;
    width: 100%;
}

#links-menu-toggle {
    padding-top: 0;
    padding-bottom: 0;
}

@media (min-width: 768px) {
    #links-menu-toggle {
        padding: 0;
    }
    #links-submenu .hub-link,
    #links-submenu .btn {
        width: auto;
    }
}

#links-submenu a[href*="throne.com/aira_real"] {
    color: #ec4899;
}

#links-submenu a[href*="throne.com/aira_real"]:hover {
    color: #f9a8d4;
}

@media (max-width: 767px) {
    #main-nav {
        overflow-y: auto;
        padding-top: 3.5rem;
    }

    #mobile-menu-close {
        top: 1rem;
        right: 1rem;
    }

    #main-nav.links-view > *:not(#mobile-menu-close):not(#links-container) {
        display: none;
    }

    #main-nav.links-view .links-container {
        width: 100%;
    }

    #main-nav.links-view #links-menu-toggle {
        width: 100%;
        text-align: left;
        padding-left: 0;
        padding-right: 2.5rem;
        margin-top: 0;
        margin-bottom: 0.75rem;
    }

    #main-nav.links-view #links-submenu {
        position: static;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        background-color: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
    }

    #links-submenu .hub-link,
    #links-submenu .btn,
    #links-submenu button {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0.35rem 0;
        background-color: transparent;
        background-image: none;
        box-shadow: none;
        border-radius: 0;
        border: none;
        text-align: left;
        font-weight: 600;
        color: #f9fafb;
        text-decoration: none;
        cursor: pointer;
    }

    #links-submenu .hub-link:hover,
    #links-submenu .btn:hover,
    #links-submenu button:hover {
        background-color: transparent;
        color: #e5e7eb;
        transform: none;
    }

    #links-submenu a[href="#idle-game"] {
        color: #ec4899;
    }

    #links-submenu a[href="#idle-game"]:hover {
        color: #f9a8d4;
    }

    #actions {
        gap: 0.25rem;
    }

    #links-submenu a[href*="throne.com/aira_real"] {
        color: #ec4899;
    }

    #links-submenu a[href*="throne.com/aira_real"]:hover {
        color: #f9a8d4;
    }
}