/* Download Modal Styles */
.dm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
}

.dm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dm-modal {
    background: var(--color-bg, #ffffff);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid var(--color-border, #e2e8f0);
}

.dm-header {
    background: linear-gradient(135deg, #2B542C 0%, #3d7a3f 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #DFF0D8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dm-title i {
    color: #DFF0D8;
}

.dm-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    line-height: 1;
}

.dm-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dm-body {
    padding: 2.5rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, #f8faf8 0%, #ffffff 100%);
}

/* ===== HAVALI SAYAÇ ===== */
.dm-timer-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 2rem;
}

.dm-timer-ring {
    position: relative;
    width: 100%;
    height: 100%;
}

.dm-timer-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 20px rgba(43, 84, 44, 0.3));
}

.dm-timer-circle-bg {
    fill: none;
    stroke: #e8f0e8;
    stroke-width: 10;
}

.dm-timer-circle-progress {
    fill: none;
    stroke: url(#timerGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
}

.dm-timer-circle-glow {
    fill: none;
    stroke: #2B542C;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    opacity: 0.2;
    filter: blur(4px);
}

.dm-timer-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.dm-timer-text {
    font-size: 3.5rem;
    font-weight: 900;
    color: #2B542C;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(43, 84, 44, 0.2);
}

.dm-timer-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* Number pop animation */
.dm-timer-text.dm-number-pop {
    animation: numberPop 0.2s ease-out;
}

@keyframes numberPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* Son 3 saniye - urgent pulse */
.dm-timer-wrapper.dm-urgent .dm-timer-text {
    color: #dc2626;
    animation: urgentPulse 0.5s ease-in-out infinite;
}

.dm-timer-wrapper.dm-urgent .dm-timer-circle-progress {
    stroke: #dc2626;
}

@keyframes urgentPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Paused state */
.dm-timer-wrapper.dm-paused .dm-timer-ring {
    opacity: 0.5;
}

.dm-timer-wrapper.dm-paused .dm-timer-text {
    animation: pauseBlink 1s ease-in-out infinite;
}

@keyframes pauseBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Complete state */
.dm-timer-wrapper.dm-complete {
    animation: completeZoom 0.5s ease-out forwards;
}

@keyframes completeZoom {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* ===== INFO BOX ===== */
.dm-info-box {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #FCF8E3;
    border: 1px solid #faebcc;
    border-radius: 10px;
    color: #66512C;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

html.dark .dm-info-box {
    background: rgba(102, 81, 44, 0.2);
    border-color: rgba(102, 81, 44, 0.4);
    color: #FCF8E3;
}

/* ===== AD AREA ===== */
.dm-ad-wrapper {
    margin-bottom: 1.5rem;
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
}

.dm-ad-slot {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.dm-ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
}

.dm-ad-placeholder i {
    font-size: 2rem;
}

.dm-ad-placeholder span {
    font-size: 12px;
    font-weight: 600;
}

/* Dark Mode AD */
html.dark .dm-ad-wrapper {
    background: transparent;
}

/* ===== MESSAGE BOX ===== */
.dm-message-box {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #D9EDF7;
    border: 1px solid #245269;
    border-radius: 12px;
    color: #245269;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dm-message-box i {
    font-size: 1.1rem;
}

.dm-message-box.warning {
    background: #F2DEDE;
    border: 1px solid #ebccd1;
    color: #843534;
}

.dm-message-box.success {
    background: #DFF0D8;
    border-color: #2B542C;
    color: #2B542C;
}

/* ===== ACTION AREA ===== */
.dm-action-area {
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dm-btn-download {
    background: linear-gradient(135deg, #2B542C 0%, #3d7a3f 100%);
    color: #DFF0D8;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(43, 84, 44, 0.4);
}

.dm-btn-download:hover {
    background: linear-gradient(135deg, #3d7a3f 0%, #2B542C 100%);
    color: #DFF0D8;
}

.dm-btn-download i {
    font-size: 1.2rem;
}

/* Dark mode */
html.dark .dm-modal {
    background: #1a1a1a;
}

html.dark .dm-body {
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
}

html.dark .dm-timer-circle-bg {
    stroke: #333;
}

html.dark .dm-timer-text {
    color: #DFF0D8;
}

html.dark .dm-timer-label {
    color: #888;
}