/* Cinematic Paywall - Premium Pirate Design */

/* Main paywall modal */
.cinematic-paywall {
    background: 
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.95) 100%),
        linear-gradient(45deg, rgba(44, 62, 80, 0.3) 0%, rgba(52, 73, 94, 0.3) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.paywall-content {
    max-width: 600px;
    background: 
        linear-gradient(145deg, rgba(139, 105, 20, 0.1) 0%, rgba(191, 149, 63, 0.05) 100%),
        radial-gradient(ellipse at top, rgba(44, 62, 80, 0.95) 0%, rgba(52, 73, 94, 0.98) 100%);
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: paywallEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Golden border effect */
.paywall-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, 
        #8B6914 0%, #BF953F 25%, #FFD700 50%, #BF953F 75%, #8B6914 100%);
    background-size: 400% 400%;
    border-radius: 23px;
    z-index: -1;
    animation: goldenBorderFlow 4s ease infinite;
}

@keyframes paywallEntrance {
    0% {
        opacity: 0;
        transform: scale(0.3) rotateY(-90deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotateY(-10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

@keyframes goldenBorderFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Header with treasure chest */
.paywall-header {
    text-align: center;
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, rgba(191, 149, 63, 0.1) 0%, rgba(139, 105, 20, 0.05) 100%);
    border-bottom: 2px solid rgba(191, 149, 63, 0.3);
    position: relative;
}

/* Treasure chest animation */
.treasure-chest-container {
    margin-bottom: 20px;
    perspective: 1000px;
}

.treasure-chest {
    display: inline-block;
    position: relative;
    font-size: 3em;
    animation: chestBob 3s ease-in-out infinite;
}

.chest-lid {
    position: relative;
    animation: chestOpen 4s ease-in-out infinite;
    transform-origin: bottom center;
}

.chest-lock {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.4em;
    animation: lockGlow 2s ease-in-out infinite alternate;
}

.chest-base {
    margin-top: 5px;
    position: relative;
}

.chest-gems {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.3em;
    opacity: 0;
    animation: gemsSparkle 4s ease-in-out infinite;
}

@keyframes chestBob {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-2deg); }
    50% { transform: translateY(0px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

@keyframes chestOpen {
    0%, 70% { transform: rotateX(0deg); }
    80%, 90% { transform: rotateX(-30deg); }
    100% { transform: rotateX(0deg); }
}

@keyframes lockGlow {
    from { 
        filter: drop-shadow(0 0 5px #FFD700);
        transform: translateX(-50%) scale(1);
    }
    to { 
        filter: drop-shadow(0 0 15px #FFD700);
        transform: translateX(-50%) scale(1.1);
    }
}

@keyframes gemsSparkle {
    0%, 70% { opacity: 0; transform: translateX(-50%) translateY(0px); }
    80% { opacity: 1; transform: translateX(-50%) translateY(-20px); }
    90% { opacity: 1; transform: translateX(-50%) translateY(-30px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-40px); }
}

/* Paywall title */
.paywall-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(45deg, #FFD700, #BF953F, #FFD700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 3s ease infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
    margin: 0 0 20px 0;
    letter-spacing: 2px;
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Captain message */
.captain-message {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.captain-bubble {
    background: 
        linear-gradient(145deg, rgba(139, 105, 20, 0.2) 0%, rgba(191, 149, 63, 0.1) 100%),
        rgba(52, 73, 94, 0.95);
    border: 2px solid #BF953F;
    border-radius: 20px 20px 20px 5px;
    padding: 15px 20px;
    position: relative;
    max-width: 300px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: bubbleFloat 3s ease-in-out infinite;
}

.captain-bubble::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #BF953F, #FFD700, #BF953F);
    border-radius: 22px 22px 22px 7px;
    z-index: -1;
}

.speech-tail {
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: #BF953F;
}

.captain-speech {
    margin: 0;
    color: #ecf0f1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.captain-pirate {
    font-size: 4em;
    animation: captainWave 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(191, 149, 63, 0.8));
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes captainWave {
    0%, 100% { transform: rotate(-5deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.05); }
    50% { transform: rotate(-2deg) scale(1); }
    75% { transform: rotate(3deg) scale(1.05); }
}

/* Treasure map container */
.treasure-map-container {
    padding: 30px;
    background: 
        radial-gradient(ellipse at center, rgba(139, 105, 20, 0.1) 0%, transparent 70%),
        linear-gradient(45deg, rgba(52, 73, 94, 0.3) 0%, rgba(44, 62, 80, 0.3) 100%);
}

.map-scroll {
    background: 
        linear-gradient(145deg, rgba(160, 120, 60, 0.1) 0%, rgba(139, 105, 20, 0.05) 100%),
        rgba(52, 73, 94, 0.8);
    border: 2px solid rgba(191, 149, 63, 0.4);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Map decorative corners */
.map-scroll::before,
.map-scroll::after {
    content: '🗺️';
    position: absolute;
    font-size: 1.5em;
    opacity: 0.3;
    animation: mapCornerGlow 4s ease-in-out infinite alternate;
}

.map-scroll::before {
    top: 10px;
    left: 10px;
}

.map-scroll::after {
    bottom: 10px;
    right: 10px;
    transform: rotate(180deg);
}

@keyframes mapCornerGlow {
    from { opacity: 0.2; filter: drop-shadow(0 0 5px #BF953F); }
    to { opacity: 0.4; filter: drop-shadow(0 0 15px #BF953F); }
}

.map-header {
    text-align: center;
    margin-bottom: 25px;
}

.map-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8em;
    font-weight: 600;
    color: #BF953F;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.map-decoration {
    color: #8B6914;
    font-size: 1.2em;
    animation: decorationSway 3s ease-in-out infinite;
}

@keyframes decorationSway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Feature rows */
.treasure-features {
    margin-bottom: 25px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    margin-bottom: 12px;
    background: rgba(44, 62, 80, 0.4);
    border: 1px solid rgba(191, 149, 63, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(191, 149, 63, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-row:hover {
    transform: translateX(5px);
    border-color: rgba(191, 149, 63, 0.5);
    box-shadow: 0 5px 15px rgba(191, 149, 63, 0.2);
}

.feature-row:hover::before {
    left: 100%;
}

.feature-icon {
    font-size: 2em;
    min-width: 50px;
    text-align: center;
    animation: featureIconBob 2s ease-in-out infinite;
}

.feature-row:nth-child(1) .feature-icon { animation-delay: 0s; }
.feature-row:nth-child(2) .feature-icon { animation-delay: 0.2s; }
.feature-row:nth-child(3) .feature-icon { animation-delay: 0.4s; }
.feature-row:nth-child(4) .feature-icon { animation-delay: 0.6s; }
.feature-row:nth-child(5) .feature-icon { animation-delay: 0.8s; }

@keyframes featureIconBob {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-3px) scale(1.1); }
}

.feature-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    color: #BF953F;
    font-size: 1.1em;
    font-weight: 700;
}

.feature-text span {
    color: #bdc3c7;
    font-size: 0.9em;
    font-style: italic;
}

.feature-sparkle {
    font-size: 1.5em;
    animation: sparkleRotate 3s linear infinite;
}

@keyframes sparkleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Price treasure container */
.price-treasure-container {
    text-align: center;
    margin-top: 30px;
    position: relative;
}

.price-chest {
    display: inline-block;
    position: relative;
    padding: 20px;
}

.price-glow {
    background: linear-gradient(45deg, #BF953F, #FFD700, #BF953F);
    background-size: 300% 300%;
    border: 3px solid #8B6914;
    border-radius: 20px;
    padding: 20px 30px;
    position: relative;
    animation: priceChestGlow 3s ease infinite;
    box-shadow: 
        0 0 30px rgba(191, 149, 63, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.price-amount {
    font-family: 'Cinzel', serif;
    font-size: 3em;
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
    line-height: 1;
}

.price-label {
    font-size: 1em;
    color: #2c3e50;
    font-weight: 600;
    margin-top: 5px;
}

@keyframes priceChestGlow {
    0%, 100% { 
        background-position: 0% 50%;
        box-shadow: 0 0 30px rgba(191, 149, 63, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.3);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 0 0 50px rgba(191, 149, 63, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.4);
    }
}

.floating-coins {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.coin {
    position: absolute;
    font-size: 1.5em;
    animation: coinFloat 4s ease-in-out infinite;
}

.coin:nth-child(1) {
    top: -40px;
    left: -60px;
    animation-delay: 0s;
}

.coin:nth-child(2) {
    top: -60px;
    right: -40px;
    animation-delay: 1.3s;
}

.coin:nth-child(3) {
    bottom: -40px;
    left: -40px;
    animation-delay: 2.6s;
}

@keyframes coinFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    25% { 
        transform: translateY(-15px) rotate(90deg);
        opacity: 1;
    }
    50% { 
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-15px) rotate(270deg);
        opacity: 1;
    }
}

/* Action buttons */
.paywall-actions {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.3) 0%, rgba(52, 73, 94, 0.3) 100%);
    border-top: 1px solid rgba(191, 149, 63, 0.3);
}

.treasure-upgrade-button {
    background: linear-gradient(45deg, #8B6914, #BF953F, #FFD700, #BF953F, #8B6914);
    background-size: 300% 300%;
    border: 3px solid #FFD700;
    border-radius: 25px;
    padding: 15px 30px;
    color: #2c3e50;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 25px rgba(191, 149, 63, 0.4);
}

.treasure-upgrade-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.treasure-upgrade-button:hover {
    background-position: 100% 50%;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(191, 149, 63, 0.6);
}

.treasure-upgrade-button:hover::before {
    left: 100%;
}

.treasure-upgrade-button:active {
    transform: translateY(-1px);
}

.button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.button-icon {
    font-size: 1.5em;
    animation: buttonIconPulse 2s ease-in-out infinite;
}

@keyframes buttonIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.button-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.main-text {
    font-size: 1.2em;
    font-weight: 700;
}

.sub-text {
    font-size: 0.9em;
    opacity: 0.8;
}

.button-sparkles {
    display: flex;
    gap: 5px;
}

.button-sparkles span {
    animation: sparkleWink 1.5s ease-in-out infinite;
}

.button-sparkles span:nth-child(1) { animation-delay: 0s; }
.button-sparkles span:nth-child(2) { animation-delay: 0.5s; }
.button-sparkles span:nth-child(3) { animation-delay: 1s; }

@keyframes sparkleWink {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.maybe-later-button {
    background: rgba(52, 73, 94, 0.8);
    border: 2px solid rgba(191, 149, 63, 0.3);
    border-radius: 15px;
    padding: 10px 20px;
    color: #bdc3c7;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.maybe-later-button:hover {
    border-color: rgba(191, 149, 63, 0.6);
    color: #ecf0f1;
    transform: translateY(-2px);
}

.maybe-later-button .button-icon {
    margin-right: 8px;
}

/* Trust indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    background: rgba(44, 62, 80, 0.2);
    border-top: 1px solid rgba(191, 149, 63, 0.2);
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #bdc3c7;
    font-size: 0.9em;
}

.trust-icon {
    font-size: 1.5em;
    color: #BF953F;
    animation: trustIconGlow 3s ease-in-out infinite alternate;
}

@keyframes trustIconGlow {
    from { filter: drop-shadow(0 0 3px #BF953F); }
    to { filter: drop-shadow(0 0 8px #BF953F); }
}

.trust-text {
    font-weight: 600;
    text-align: center;
}

/* Floating particles */
.paywall-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 1.5em;
    opacity: 0.6;
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 30%;
    animation-delay: 3s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: 6s;
    animation-duration: 15s;
}

.particle:nth-child(4) {
    left: 70%;
    animation-delay: 9s;
    animation-duration: 20s;
}

.particle:nth-child(5) {
    left: 90%;
    animation-delay: 12s;
    animation-duration: 14s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .paywall-content {
        margin: 10px;
        max-width: none;
    }
    
    .paywall-title {
        font-size: 2em;
    }
    
    .captain-message {
        flex-direction: column;
        gap: 10px;
    }
    
    .captain-pirate {
        font-size: 3em;
    }
    
    .treasure-map-container {
        padding: 20px;
    }
    
    .map-scroll {
        padding: 20px;
    }
    
    .feature-row {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .feature-icon {
        font-size: 2.5em;
    }
    
    .price-amount {
        font-size: 2.5em;
    }
    
    .treasure-upgrade-button {
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .button-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .trust-indicators {
        gap: 15px;
    }
    
    .trust-item {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .paywall-header {
        padding: 20px 15px;
    }
    
    .treasure-chest {
        font-size: 2.5em;
    }
    
    .paywall-title {
        font-size: 1.6em;
    }
    
    .captain-bubble {
        max-width: 250px;
        padding: 12px 15px;
    }
    
    .map-title {
        font-size: 1.4em;
    }
    
    .feature-text strong {
        font-size: 1em;
    }
    
    .price-amount {
        font-size: 2em;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .paywall-content {
        border: 3px solid #FFD700;
        background: #000;
        color: #FFF;
    }
    
    .treasure-upgrade-button {
        background: #FFD700;
        color: #000;
        border: 2px solid #FFF;
    }
    
    .feature-row {
        border-color: #FFD700;
        background: rgba(255, 215, 0, 0.1);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .paywall-content,
    .treasure-chest,
    .chest-lid,
    .paywall-title,
    .captain-pirate,
    .feature-icon,
    .particle,
    .coin,
    .button-icon {
        animation: none !important;
    }
    
    .paywall-content {
        transform: none !important;
    }
}
