/**
 * Amuse Password Gate - Dark Pirate Theme
 * Styles for the password protection overlay
 */

/* Import Pirate Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Pirata+One&family=Creepster&family=Cinzel:wght@400;700&display=swap');

/* Hide page content when gate is active */
body.amuse-gate-active {
    overflow: hidden !important;
}

body.amuse-gate-active > *:not(#amuse-password-gate):not(script):not(style) {
    display: none !important;
}

/* Screen reader utility */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Main Overlay */
.amuse-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Animated Background Particles */
.gate-bg-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 140, 0, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 140, 0, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 140, 0, 0.25), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 140, 0, 0.2), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 140, 0, 0.15), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(255, 140, 0, 0.2), transparent);
    background-size: 200% 200%;
    animation: particleFloat 20s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes particleFloat {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%, 80% 20%, 20% 80%, 70% 30%; }
    50% { background-position: 100% 100%, 0% 0%, 25% 75%, 60% 40%, 40% 60%, 90% 10%; }
}

/* Fog Overlay */
.gate-fog-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(255, 140, 0, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(255, 140, 0, 0.06) 0%, transparent 50%);
    animation: fogDrift 15s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes fogDrift {
    0% { transform: translateX(-5%) scale(1); opacity: 0.5; }
    100% { transform: translateX(5%) scale(1.1); opacity: 0.7; }
}

/* Main Container */
.gate-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    padding: 3rem 2rem;
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.95), rgba(0, 0, 0, 0.98));
    border: 2px solid rgba(255, 140, 0, 0.4);
    border-radius: 20px;
    box-shadow: 
        0 0 60px rgba(255, 140, 0, 0.3),
        0 20px 80px rgba(0, 0, 0, 0.9),
        inset 0 0 40px rgba(255, 140, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: containerPulse 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes containerPulse {
    0%, 100% { box-shadow: 0 0 60px rgba(255, 140, 0, 0.3), 0 20px 80px rgba(0, 0, 0, 0.9), inset 0 0 40px rgba(255, 140, 0, 0.05); }
    50% { box-shadow: 0 0 80px rgba(255, 140, 0, 0.4), 0 20px 80px rgba(0, 0, 0, 0.9), inset 0 0 50px rgba(255, 140, 0, 0.08); }
}

/* Skull Icon */
.gate-skull {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 0 20px rgba(255, 140, 0, 0.5));
    animation: skullFloat 4s ease-in-out infinite;
}

@keyframes skullFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.gate-skull .eye-glow {
    animation: eyeGlow 2s ease-in-out infinite;
}

@keyframes eyeGlow {
    0%, 100% { opacity: 1; filter: drop-shadow(0 0 5px #ff8c00); }
    50% { opacity: 0.6; filter: drop-shadow(0 0 10px #ff8c00); }
}

/* Title */
.gate-title {
    text-align: center;
    margin: 0 0 2rem;
}

.gate-title-main {
    display: block;
    font-family: 'Pirata One', cursive;
    font-size: clamp(2rem, 6vw, 3rem);
    color: #ff8c00;
    text-shadow: 
        0 0 10px rgba(255, 140, 0, 0.8),
        0 0 20px rgba(255, 140, 0, 0.5),
        0 0 30px rgba(255, 140, 0, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.05em;
    animation: titleFlicker 3s ease-in-out infinite;
    margin-bottom: 0.5rem;
}

@keyframes titleFlicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(255, 140, 0, 0.8), 0 0 20px rgba(255, 140, 0, 0.5), 0 0 30px rgba(255, 140, 0, 0.3), 2px 2px 4px rgba(0, 0, 0, 0.8); }
    50% { opacity: 0.95; text-shadow: 0 0 15px rgba(255, 140, 0, 1), 0 0 25px rgba(255, 140, 0, 0.6), 0 0 35px rgba(255, 140, 0, 0.4), 2px 2px 4px rgba(0, 0, 0, 0.8); }
}

.gate-title-sub {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 400;
}

/* Form */
.gate-form {
    margin: 0;
}

/* Input Wrapper */
.gate-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.gate-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: 'Cinzel', serif;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 140, 0, 0.3);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.1em;
}

.gate-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.gate-input:focus {
    border-color: rgba(255, 140, 0, 0.8);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.3);
}

.gate-input-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 140, 0, 0.3), transparent);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
    display: none; /* Removed spinning animation */
}

.gate-input:focus + .gate-input-glow {
    opacity: 0; /* Disabled */
}

@keyframes inputGlow {
    /* Animation removed */
}

/* Submit Button */
.gate-submit {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: 'Pirata One', cursive;
    color: #000000;
    background: linear-gradient(135deg, #ff8c00, #e67600);
    border: 2px solid #ff8c00;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

.gate-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 140, 0, 0.6);
    background: linear-gradient(135deg, #ffa500, #ff8c00);
}

.gate-submit:active {
    transform: translateY(0);
}

.gate-submit-text {
    position: relative;
    z-index: 2;
}

.gate-submit-icon {
    margin-left: 0.5rem;
    display: inline-block;
    animation: anchorSway 2s ease-in-out infinite;
}

@keyframes anchorSway {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

.gate-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.gate-submit:hover::before {
    width: 300px;
    height: 300px;
}

/* Error Message */
.gate-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
    border-radius: 8px;
    color: #ff6b6b;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    animation: errorShake 0.5s ease;
}

.gate-error.show {
    display: block;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Loading Spinner */
.gate-loading {
    display: none;
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Cinzel', serif;
}

.gate-loading.show {
    display: block;
}

.gate-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.5rem;
    border: 3px solid rgba(255, 140, 0, 0.2);
    border-top-color: #ff8c00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Decorative Chains - REMOVED */
.gate-decorative {
    display: none; /* Chains removed */
}

.gate-chain {
    display: none; /* Chains removed */
}

.gate-chain-left {
    display: none; /* Chains removed */
}

.gate-chain-right {
    display: none; /* Chains removed */
}

@keyframes chainSwing {
    /* Animation removed */
}

/* Footer */
.gate-footer {
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
}

.gate-warning {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 8px;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Success Overlay */
.gate-success-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.gate-success-overlay.show {
    display: flex;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gate-success-content {
    text-align: center;
    animation: successZoom 0.6s ease;
}

@keyframes successZoom {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.gate-success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #ff8c00, #e67600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #000000;
    box-shadow: 0 0 40px rgba(255, 140, 0, 0.6);
    animation: successIconPulse 1s ease-in-out infinite;
}

@keyframes successIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.gate-success-title {
    font-family: 'Pirata One', cursive;
    font-size: 2.5rem;
    color: #ff8c00;
    margin: 0 0 0.5rem;
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.8);
}

.gate-success-text {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gate-container {
        padding: 2rem 1.5rem;
    }

    .gate-skull {
        width: 150px;
        height: 150px;
    }

    .gate-title-main {
        font-size: 2rem;
    }

    .gate-title-sub {
        font-size: 0.85rem;
    }

    .gate-input {
        font-size: 1rem;
        padding: 0.875rem 1.25rem;
    }

    .gate-submit {
        font-size: 1.1rem;
        padding: 0.875rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .gate-container {
        padding: 1.5rem 1rem;
    }

    .gate-skull {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }

    .gate-title-main {
        font-size: 1.75rem;
    }

    .gate-chain {
        display: none;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hide gate when authenticated */
.amuse-gate-hidden {
    animation: gateDissolve 1s ease forwards;
}

@keyframes gateDissolve {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); pointer-events: none; }
}

