/**
 * Bot Shield Logo CAPTCHA Styles
 * Синий дизайн с градиентом и вращающимися логотипами
 */

:root {
    --logo-primary: #0088cc;
    --logo-primary-dark: #006699;
    --logo-primary-darker: #004466;
    --logo-success: #28a745;
    --logo-danger: #dc3545;
    --logo-text: #ffffff;
    --logo-text-shadow: rgba(0, 0, 0, 0.3);
    --logo-shadow: 0 8px 20px rgba(0, 136, 204, 0.3);
}

/* Container */
.bot-shield-logo-captcha-container {
    background: linear-gradient(135deg, var(--logo-primary-darker) 0%, var(--logo-primary-dark) 50%, var(--logo-primary) 100%);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--logo-shadow);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Декоративный фон */
.bot-shield-logo-captcha-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Header */
.logo-captcha-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.logo-captcha-header h3 {
    color: var(--logo-text);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-shadow: 2px 2px 4px var(--logo-text-shadow);
}

.target-service-name {
    display: inline-block;
    color: var(--logo-text);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 2px 2px 4px var(--logo-text-shadow);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 255, 255, 0.3);
    }
}

/* Arena */
.logo-captcha-arena {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg,
        rgba(0, 102, 153, 0.3) 0%,
        rgba(0, 136, 204, 0.3) 50%,
        rgba(0, 102, 153, 0.3) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    cursor: crosshair;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Arena background с анимированными кругами */
.arena-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.arena-background::before,
.arena-background::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
}

.arena-background::before {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.arena-background::after {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -200px;
    animation-delay: 7s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(50px, 50px);
    }
    50% {
        transform: translate(0, 100px);
    }
    75% {
        transform: translate(-50px, 50px);
    }
}

/* Canvas for logo rendering (защита от DOM bypass) */
#logoCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Empty Click Feedback */
.empty-click-feedback {
    position: fixed;
    font-size: 32px;
    pointer-events: none;
    z-index: 10000;
    animation: emptyClickAnim 1s ease-out forwards;
    transform: translate(-50%, -50%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes emptyClickAnim {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        transform: translate(-50%, -70%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -90%) scale(0.8);
    }
}

/* Footer */
.logo-captcha-footer {
    margin-top: 16px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo-captcha-footer small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    text-shadow: 1px 1px 2px var(--logo-text-shadow);
}

#logoTimer {
    font-weight: 700;
    color: var(--logo-text);
    font-size: 16px;
}

/* Messages */
.captcha-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.3s ease;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px var(--logo-text-shadow);
}

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

.captcha-success {
    background: rgba(40, 167, 69, 0.3);
    color: var(--logo-text);
    border: 2px solid var(--logo-success);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.captcha-error {
    background: rgba(220, 53, 69, 0.3);
    color: var(--logo-text);
    border: 2px solid var(--logo-danger);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Responsive */
@media (max-width: 600px) {
    .bot-shield-logo-captcha-container {
        padding: 16px;
    }

    .logo-captcha-header h3 {
        font-size: 18px;
    }

    .target-service-name {
        font-size: 24px;
        padding: 6px 20px;
    }

    .logo-captcha-arena {
        height: 350px;
    }

    .moving-logo {
        width: 60px;
        height: 60px;
    }

    .moving-logo img {
        width: 75%;
        height: 75%;
    }
}

@media (max-width: 400px) {
    .logo-captcha-arena {
        height: 300px;
    }

    .moving-logo {
        width: 50px;
        height: 50px;
    }

    .target-service-name {
        font-size: 20px;
    }
}

/* Dark theme enhancement (если уже есть тёмная тема) */
[data-theme="dark"] .bot-shield-logo-captcha-container {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Loading state */
.logo-captcha-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--logo-text);
    font-size: 18px;
    text-shadow: 2px 2px 4px var(--logo-text-shadow);
}

.logo-captcha-loading::after {
    content: '⏳';
    font-size: 48px;
    animation: spin 2s linear infinite;
    margin-left: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.moving-logo:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}
