/* === НОВЫЕ СТИЛИ ДЛЯ УЛУЧШЕННОГО UI === */

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(112, 0, 255, 0.95) 0%, rgba(0, 240, 255, 0.95) 100%);
    border: 2px solid #ffd700;
    border-radius: 24px;
    padding: 30px 40px;
    text-align: center;
    z-index: 2001;
    animation: achievementPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow:
        0 0 50px rgba(255, 215, 0, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 300px;
}

.achievement-icon {
    font-size: 64px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
    animation: achievementIconSpin 0.8s ease-out;
}

.achievement-info {
    text-align: left;
}

.achievement-title {
    font-size: 10px;
    letter-spacing: 3px;
    color: #ffd700;
    font-weight: 700;
    margin-bottom: 5px;
}

.achievement-name {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 5px;
}

.achievement-reward {
    font-size: 16px;
    color: #ffd700;
    font-weight: 700;
}

@keyframes achievementPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-45deg);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
    }

    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes achievementIconSpin {
    0% {
        transform: rotate(0deg) scale(0);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Enhanced Task Item - moved to TASKS SCREEN FIXES section below */

/* Task Claim Button */
.task-claim-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
}

.task-claim-btn.locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
}

.task-claim-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.task-claim-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0, 240, 255, 0.6);
}

.task-claim-btn.active:active {
    transform: scale(0.95);
}

.task-claim-btn.claimed {
    background: rgba(0, 255, 100, 0.2);
    color: #00ff66;
    cursor: default;
    border: 1px solid rgba(0, 255, 100, 0.3);
}

/* === TASKS SCREEN FIXES === */
#screen-tasks {
    min-height: 100vh;
    overflow-y: auto !important;
}

#screen-tasks .screen-content {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    overflow: visible !important;
    min-height: auto !important;
    max-height: none !important;
}

/* Daily Reward Banner - Already styled above */

/* Tasks Container - Main fix */
#tasks-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible !important;
}

/* Task Category Title */
.task-category-title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 2px;
    margin: 20px 0 12px 0;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    text-transform: uppercase;
    display: block !important;
    visibility: visible !important;
}

.task-category-title:first-child {
    margin-top: 0;
}

/* Task Item - Enhanced */
.task-item {
    display: flex !important;
    align-items: center;
    gap: 15px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.task-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.task-icon {
    font-size: 32px;
    min-width: 48px;
    height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.task-info {
    flex: 1;
    display: block !important;
}

.task-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    display: block !important;
}

.task-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block !important;
}

.task-reward {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
    display: block !important;
}

/* Referral Section - Fix visibility */
.referral-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 20px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

.referral-header {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.referral-code-box {
    display: block !important;
    background: rgba(0, 240, 255, 0.1);
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.referral-stats-row {
    display: flex !important;
    gap: 15px;
    margin-top: 15px;
}

.referral-stat {
    flex: 1;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    display: block !important;
}

.referral-stat-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 5px;
    display: block !important;
}

.referral-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block !important;
}

/* Screen Transitions */
.screen,
.main-screen {
    animation: screenFadeIn 0.3s ease-out;
}

@keyframes screenFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Glass Panel */
.glass-panel {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Improved Settings Toggle */
.modal-header {
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.setting-row {
    position: relative;
    transition: background 0.2s;
}

.setting-row:hover {
    background: rgba(0, 240, 255, 0.03);
}

/* Sound Toggle Button */
.toggle-btn {
    position: relative;
    overflow: hidden;
}

.toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.toggle-btn.active::before {
    width: 100%;
    height: 100%;
}

/* Daily Reward Banner */
.daily-reward-banner {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 100, 0, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 20px;
    margin: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.daily-reward-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    animation: dailyShine 3s infinite;
}

@keyframes dailyShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.daily-reward-banner:active {
    transform: scale(0.98);
}

/* Referral Code specific style */
.referral-code {
    font-family: monospace;
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    margin: 10px 0;
    display: block !important;
}

/* All other referral styles are in TASKS SCREEN FIXES section above */

#tasks-container {
    margin-top: 20px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
}

.task-category-title {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 2px;
    margin: 25px 0 12px 0;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    text-transform: uppercase;
    display: block !important;
}

.share-btn {
    background: linear-gradient(135deg, #0088cc 0%, #00aaff 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.share-btn:active {
    transform: scale(0.95);
}

/* Stats Enhancement */
.stat-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    margin: 4px;
}

/* Loading Spinner (for future use) */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 240, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Blink Animation for Status Dot */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Smooth Tab Transition */
.tab-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Balance Glow */
.balance-value {
    animation: balanceGlow 3s ease-in-out infinite;
}

@keyframes balanceGlow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }

    50% {
        text-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
    }
}