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

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

.dm-modal {
    background: var(--color-bg, #ffffff);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--color-border, #e2e8f0);
}

.dm-overlay.active .dm-modal {
    transform: translateY(0);
}

.dm-header {
    background: var(--color-bg-secondary, #f8fafc);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text, #1e293b);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dm-close {
    background: none;
    border: none;
    color: var(--color-text-secondary, #64748b);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: color 0.2s;
}

.dm-close:hover {
    color: var(--color-danger, #ef4444);
}

.dm-body {
    padding: 2rem;
    text-align: center;
}

/* Timer Circle */
.dm-timer-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.dm-timer-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.dm-timer-circle-bg {
    fill: none;
    stroke: var(--color-bg-secondary, #e2e8f0);
    stroke-width: 8;
}

.dm-timer-circle-progress {
    fill: none;
    stroke: var(--color-primary, #2563eb);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    /* 2 * pi * 45 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.dm-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text, #1e293b);
}

.dm-message-box {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    color: #1e40af;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.dm-message-box.warning {
    background: #fef2f2;
    border-color: #fee2e2;
    color: #991b1b;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

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

.dm-btn-download {
    background: var(--color-success, #22c55e);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.dm-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.4);
    background: #16a34a;
}