#app-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    overflow-y: auto;
    margin: 0 auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}
@media (min-width: 450px) {
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 0;
    }
    #app-container {
        /* ИСПРАВЛЕНИЕ: Задаем фиксированную ширину, чтобы окно не "плавало" */
        width: 420px;
        /* Но позволяем ему сжиматься на очень узких экранах */
        max-width: 100%; 
        /* Высота будет рассчитана автоматически из соотношения сторон */
        height: auto; 
        /* Ограничиваем максимальную высоту на очень низких экранах */
        max-height: 90vh; 
        aspect-ratio: 9 / 16;
        border-radius: 2rem;
    }
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #2d2a4a;
    background-image: linear-gradient(to right, #241940 0%, #461b6f 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
.gradient-text {
    background-image: linear-gradient(90deg, #34D399, #22D3EE);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loader {
    animation: spin 1s linear infinite;
}

/* Стили для блока кнопок активностей */
.activities-tabs-container {
    display: flex;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgb(39, 39, 42);
    border-radius: 0.75rem;
    padding: 0.25rem;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.activities-tab-button {
    flex: 1;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

.activities-tab-button.active {
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
}

.activities-tab-button:not(.active) {
    background-color: transparent;
    color: rgb(161, 161, 170);
}

.activities-tab-button:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
}

@keyframes activityPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 20px 5px rgba(52, 211, 153, 0.2); }
}

@keyframes recordBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.activity-card.has-new-record {
    animation: activityPulse 2s infinite;
    border: 1px solid #34d399;
}

.record-badge {
    animation: recordBeat 1.5s infinite;
}
