/**
 * Ads and Task Buttons Styles
 */

/* === КРАСИВЫЙ ТАЙМЕР ОБРАТНОГО ОТСЧЕТА (как в REFERENCE) === */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.7),
        rgba(26, 26, 46, 0.7)
    );
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: #FFFFFF;
    border-radius: 12px;
    z-index: 9999;
    font-family: "Orbitron", monospace, Arial, sans-serif;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 193, 7, 0.6),
        0 0 30px rgba(255, 193, 7, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: pulse 1s ease-in-out infinite;
    pointer-events: all !important;
    cursor: not-allowed !important;
    border: 2px solid rgba(255, 193, 7, 0.3);
    box-shadow:
        inset 0 0 20px rgba(255, 193, 7, 0.1),
        0 0 20px rgba(0, 0, 0, 0.5);
}

/* Дополнительные стили для максимальной контрастности таймера */
.countdown-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    z-index: -1;
    border: 1px solid rgba(255, 193, 7, 0.5);
}

/* Стили для цифр таймера */
.countdown-overlay .countdown-time {
    position: relative;
    z-index: 2;
    color: #FFFFFF !important;
    font-weight: 900;
    font-size: 26px;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    background-clip: unset !important;
    filter: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Стиль для нажатой кнопки (улучшенный) */
.ad-button.pressed,
.action-button.pressed {
    background: #666 !important;
    opacity: 0.7;
    pointer-events: none !important;
    cursor: not-allowed !important;
    position: relative !important;
}

/* Task button states */
.action-button {
    position: relative;
    transition: all 0.3s ease;
}

.action-button.processing {
    opacity: 0.7;
    pointer-events: none;
}

.action-button.on-cooldown {
    opacity: 0.6;
    background: #666 !important;
}

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

/* Counter styles */
.ad-counter {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.ad-counter.limit-reached {
    color: #ff6b6b;
    font-weight: bold;
}

/* Reward badge styles */
.reward-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Button content layout */
.button-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.button-text {
    font-weight: 600;
    margin-bottom: 2px;
}

/* Button press effects for all action buttons */
.action-button:active,
.action-button.purple-button:active,
.action-button.blue-button:active,
.action-button.orange-button:active {
    transform: translateY(2px) scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.1s ease !important;
}

/* === АНИМАЦИИ === */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

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

/* Task completion animations */
@keyframes taskComplete {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.action-button.completed {
    animation: taskComplete 0.5s ease;
}

/* Cooldown timer styles */
.action-button.on-cooldown .ad-counter {
    color: #ffa500;
    font-weight: bold;
}

/* Success/Error states */
.task-success {
    background: #4caf50 !important;
}

.task-error {
    background: #f44336 !important;
}

/* Monetag Button Styles - Green and Teal variants */
.action-button.green-button,
.action-button.teal-button {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    box-shadow:
        0 12px 24px rgba(76, 175, 80, 0.4),
        0 6px 12px rgba(76, 175, 80, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(69, 160, 73, 0.3);
}

.action-button.green-button:hover,
.action-button.teal-button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 32px rgba(76, 175, 80, 0.5),
        0 8px 16px rgba(76, 175, 80, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(69, 160, 73, 0.4);
    background: linear-gradient(145deg, #66BB6A, #4CAF50);
}

.action-button.teal-button {
    background: linear-gradient(145deg, #009688, #00897b);
    box-shadow:
        0 12px 24px rgba(0, 150, 136, 0.4),
        0 6px 12px rgba(0, 150, 136, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 137, 123, 0.3);
}

.action-button.teal-button:hover {
    background: linear-gradient(145deg, #26A69A, #009688);
    box-shadow:
        0 16px 32px rgba(0, 150, 136, 0.5),
        0 8px 16px rgba(0, 150, 136, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 137, 123, 0.4);
}

/* Monetag button specific styles */
.monetag-button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.monetag-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.monetag-button:hover::before {
    left: 100%;
}

/* Monetag button icons */
.monetag-button .button-icon,
.monetag-icon {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
    color: #ffffff !important;
    fill: none !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-right: 8px !important;
    pointer-events: none !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Force SVG paths to be white */
.monetag-button .button-icon svg,
.monetag-button .button-icon path,
.monetag-button .button-icon circle,
.monetag-button .button-icon rect,
.monetag-button .button-icon line {
    color: #ffffff !important;
    fill: none !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Monetag reward badges */
.monetag-reward-badge,
.reward-badge {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: bold !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    flex-shrink: 0 !important;
    z-index: 2 !important;
    visibility: visible !important;
    opacity: 1 !important;
}
svg.button-icon.hardcore-icon {
    position: absolute !important;
}

.action-button .ad-counter {
   margin: auto!important;
}

span#calc-balance {
    color: #ffc517!important;
}

.button-content {
    gap: 8px;
}