/* PostSpark Paywall Styles - Dark Theme */

.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: paywallFadeIn 0.4s ease-out;
}

@keyframes paywallFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.paywall-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: paywallSlideIn 0.5s ease-out;
    position: relative;
}

@keyframes paywallSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.paywall-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 140, 66, 0.05) 100%);
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.paywall-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b35, #ff8c42, #ff6b35);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.paywall-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.paywall-header h2 i {
    color: #ff6b35;
    font-size: 1.6rem;
    filter: drop-shadow(0 1px 2px rgba(255, 107, 53, 0.3));
}

.paywall-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

.paywall-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.paywall-profile-picture {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.profile-initials {
    color: #000000;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.paywall-user-details {
    flex: 1;
}

.paywall-user-details h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.paywall-user-details h2 i {
    color: #ff6b35;
    font-size: 1.6rem;
    filter: drop-shadow(0 1px 2px rgba(255, 107, 53, 0.3));
}

.paywall-user-details p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

.paywall-expand-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.paywall-expand-btn:hover {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
    transform: scale(1.05);
}

.paywall-expand-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.paywall-expandable-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 0 25px 20px;
    padding: 1.5rem;
    animation: expandSection 0.3s ease-out;
}

@keyframes expandSection {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 1.5rem;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding: 1.5rem;
    }
}

.paywall-user-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.paywall-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.paywall-action-btn:not(.danger) {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.paywall-action-btn:not(.danger):hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.paywall-action-btn.danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.paywall-action-btn.danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.paywall-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.paywall-action-btn i {
    font-size: 0.9rem;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
}

.notification.error {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

.notification.info {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff;
}

.notification-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification.success .notification-content i {
    color: #10b981;
}

.notification.error .notification-content i {
    color: #ef4444;
}

.notification.info .notification-content i {
    color: #3b82f6;
}

.notification-content span {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

.paywall-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.plan-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 140, 66, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.plan-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 107, 53, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 107, 53, 0.5);
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card.featured {
    border-color: rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 50%, #2a2a2a 100%);
    transform: scale(1.02);
    box-shadow: 
        0 8px 20px rgba(255, 107, 53, 0.2),
        0 0 0 1px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.plan-card.featured:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 
        0 12px 24px rgba(255, 107, 53, 0.3),
        0 0 0 1px rgba(255, 107, 53, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    padding: 6px 16px;
    border-radius: 0 0 8px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    z-index: 10;
}

.plan-header {
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
}

.plan-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 18px;
}

.plan-price .currency {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.plan-price .amount {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(255, 107, 53, 0.3);
}

.plan-price .period {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.plan-features {
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li:hover {
    color: #ffffff;
    padding-left: 3px;
}

.plan-features li i {
    color: #4CAF50;
    font-size: 0.9rem;
    width: 14px;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(76, 175, 80, 0.3));
}

.plan-button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #404040, #2a2a2a);
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.plan-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.plan-button:hover::before {
    left: 100%;
}

.plan-button:hover {
    background: linear-gradient(135deg, #4a4a4a, #353535);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.plan-button.primary {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border-color: rgba(255, 107, 53, 0.5);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.plan-button.primary:hover {
    background: linear-gradient(135deg, #ff8c42, #ff6b35);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
    transform: translateY(-4px);
    border-color: rgba(255, 107, 53, 0.8);
}

.paywall-footer {
    padding: 20px 25px 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 16px 16px;
}

.paywall-close {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.paywall-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dev-skip-btn {
    background: linear-gradient(135deg, #404040, #2a2a2a);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    backdrop-filter: blur(10px);
}

.dev-skip-btn:hover {
    background: linear-gradient(135deg, #4a4a4a, #353535);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .paywall-overlay {
        padding: 15px;
    }
    
    .paywall-content {
        border-radius: 20px;
        max-height: 95vh;
    }
    
    .paywall-header {
        padding: 25px 20px 15px;
    }
    
    .paywall-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .paywall-header h2 i {
        font-size: 1.3rem;
    }
    
    .paywall-plans {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 15px;
    }
    
    .plan-card {
        padding: 20px 15px;
    }
    
    .plan-card.featured {
        transform: scale(1.01);
    }
    
    .plan-card.featured:hover {
        transform: scale(1.01) translateY(-4px);
    }
    
    .plan-price .amount {
        font-size: 2rem;
    }
    
    .plan-header h3 {
        font-size: 1.1rem;
    }
    
    .paywall-footer {
        padding: 15px 20px 25px;
    }
    
    .paywall-close,
    .dev-skip-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
        margin-left: 8px;
    }
}

@media (max-width: 480px) {
    .paywall-overlay {
        padding: 8px;
    }
    
    .paywall-content {
        border-radius: 12px;
    }
    
    .paywall-header {
        padding: 20px 15px 15px;
    }
    
    .paywall-header h2 {
        font-size: 1.4rem;
    }
    
    .paywall-header h2 i {
        font-size: 1.2rem;
    }
    
    .paywall-header p {
        font-size: 0.85rem;
    }
    
    .paywall-plans {
        padding: 15px 12px;
    }
    
    .plan-card {
        padding: 15px 12px;
    }
    
    .plan-price .amount {
        font-size: 1.8rem;
    }
    
    .plan-header h3 {
        font-size: 1rem;
    }
    
    .plan-features li {
        font-size: 0.75rem;
        padding: 4px 0;
    }
    
    .plan-button {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .paywall-footer {
        padding: 15px 15px 20px;
    }
    
    .paywall-close,
    .dev-skip-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
        margin-left: 6px;
    }
}

/* Animation for plan cards */
.plan-card {
    animation: planCardFadeIn 0.6s ease-out;
}

.plan-card:nth-child(1) {
    animation-delay: 0.1s;
}

.plan-card:nth-child(2) {
    animation-delay: 0.2s;
}

.plan-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes planCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for buttons */
.plan-button.loading {
    position: relative;
    color: transparent;
}

.plan-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: buttonSpin 1s linear infinite;
}

@keyframes buttonSpin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Success state */
.plan-card.selected {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #fff 0%, #f8fff8 100%);
}

.plan-card.selected .plan-button {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* Error state */
.plan-card.error {
    border-color: #f44336;
    background: linear-gradient(135deg, #fff 0%, #fff8f8 100%);
}

.plan-card.error .plan-button {
    background: #f44336;
    color: white;
    border-color: #f44336;
}
