/* Turnstile Modal Styles */
.turnstile-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.turnstile-modal-content {
    background-color: #1a1a1a;
    margin: 10% auto;
    padding: 30px;
    border: 2px solid #333;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.turnstile-modal-header {
    margin-bottom: 25px;
}

.turnstile-modal-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.turnstile-modal-subtitle {
    color: #cccccc;
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
}

.turnstile-modal-body {
    margin: 25px 0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.turnstile-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.turnstile-loading {
    color: #ffffff;
    font-size: 16px;
    margin: 20px 0;
}

.turnstile-loading::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(255, 255, 255, 0);
        text-shadow: .25em 0 0 rgba(255, 255, 255, 0),
                     .5em 0 0 rgba(255, 255, 255, 0);
    }
    40% {
        color: white;
        text-shadow: .25em 0 0 rgba(255, 255, 255, 0),
                     .5em 0 0 rgba(255, 255, 255, 0);
    }
    60% {
        text-shadow: .25em 0 0 white,
                     .5em 0 0 rgba(255, 255, 255, 0);
    }
    80%, 100% {
        text-shadow: .25em 0 0 white,
                     .5em 0 0 white;
    }
}

.turnstile-modal-footer {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.turnstile-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.turnstile-btn-download {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    opacity: 0.5;
    cursor: not-allowed;
}

.turnstile-btn-download.enabled {
    opacity: 1;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.turnstile-btn-download.enabled:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.turnstile-btn-cancel {
    background: linear-gradient(45deg, #f44336, #da190b);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.turnstile-btn-cancel:hover {
    background: linear-gradient(45deg, #da190b, #f44336);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.turnstile-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.turnstile-close:hover,
.turnstile-close:focus {
    color: #fff;
    text-decoration: none;
}

.turnstile-error {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 5px;
}

.turnstile-success {
    color: #4CAF50;
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 5px;
}

/* Responsive design */
@media (max-width: 600px) {
    .turnstile-modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }
    
    .turnstile-modal-title {
        font-size: 20px;
    }
    
    .turnstile-modal-subtitle {
        font-size: 14px;
    }
    
    .turnstile-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .turnstile-modal-footer {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation for download progress */
.download-progress {
    width: 100%;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 15px;
}

.download-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}
