/* ===== Secret Wall Styles ===== */

/* Hero Section */
.wall-hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.wall-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    pointer-events: none;
}

.wall-hero .section-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(155, 89, 182, 0.15);
    border: 1px solid rgba(155, 89, 182, 0.3);
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.wall-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.wall-hero .hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.wall-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Floating Symbols Background */
.wall-floating-symbols {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.wall-floating-symbols .symbol {
    position: absolute;
    font-size: 1.5rem;
    color: rgba(155, 89, 182, 0.15);
    animation: wallFloat 20s ease-in-out infinite;
}

.wall-floating-symbols .symbol:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.wall-floating-symbols .symbol:nth-child(2) { top: 25%; right: 12%; animation-delay: -3s; }
.wall-floating-symbols .symbol:nth-child(3) { top: 60%; left: 5%; animation-delay: -7s; }
.wall-floating-symbols .symbol:nth-child(4) { top: 45%; right: 8%; animation-delay: -11s; }
.wall-floating-symbols .symbol:nth-child(5) { top: 80%; left: 15%; animation-delay: -5s; }
.wall-floating-symbols .symbol:nth-child(6) { top: 70%; right: 18%; animation-delay: -9s; }

@keyframes wallFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.15; }
    50% { transform: translateY(-20px) rotate(10deg); opacity: 0.3; }
}

/* ===== Masonry Grid ===== */
.wall-grid-section {
    padding: 40px 0 80px;
    position: relative;
}

.wall-grid-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(155, 89, 182, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.wall-masonry {
    column-count: 3;
    column-gap: 20px;
}

.wall-masonry:empty + .wall-empty {
    display: flex;
}

.wall-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.wall-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.wall-empty-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===== Post Card ===== */
.wall-card {
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: wallCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    position: relative;
    overflow: hidden;
}

.wall-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--card-accent, var(--primary)), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.wall-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--card-accent-a15, rgba(155, 89, 182, 0.25));
    box-shadow: 0 8px 32px var(--card-accent-a08, rgba(155, 89, 182, 0.12)),
                0 0 0 1px var(--card-accent-a08, rgba(155, 89, 182, 0.08));
    transform: translateY(-4px);
}

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

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

.wall-card-cipher {
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text-primary);
    word-break: break-word;
    margin-bottom: 18px;
    letter-spacing: 1px;
    position: relative;
}

.wall-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.wall-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.wall-card-pack {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--card-accent, var(--primary-light));
    font-weight: 500;
    font-size: 0.78rem;
    background: var(--card-accent-a08, rgba(155, 89, 182, 0.1));
    padding: 3px 10px;
    border-radius: 10px;
}

.wall-card-pack-icon {
    font-size: 0.7rem;
    opacity: 0.8;
}

.wall-card-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

.wall-card-heart {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.wall-card-heart:hover {
    background: rgba(255, 107, 157, 0.08);
    border-color: rgba(255, 107, 157, 0.2);
    color: var(--accent-pink);
}

.wall-card-heart.hearted {
    color: var(--accent-pink);
    background: rgba(255, 107, 157, 0.08);
    border-color: rgba(255, 107, 157, 0.15);
}

.wall-card-heart.hearted .heart-icon {
    animation: heartPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    25% { transform: scale(1.5); }
    50% { transform: scale(0.85); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.heart-icon {
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wall-card-heart:hover .heart-icon {
    transform: scale(1.15);
}

/* ===== Loading / Scroll ===== */
.wall-loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.wall-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: wallSpin 0.8s linear infinite;
}

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

.wall-end-message {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Publish Modal ===== */
.wall-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wall-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wall-modal {
    background: #1a1a2e;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.wall-modal-overlay.active .wall-modal {
    transform: translateY(0) scale(1);
}

.wall-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
}

.wall-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.wall-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.wall-modal-close:hover {
    color: var(--text-primary);
}

.wall-modal-body {
    padding: 24px;
}

.wall-input-group {
    margin-bottom: 20px;
}

.wall-input-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.wall-textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color var(--transition);
}

.wall-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
}

.wall-textarea::placeholder {
    color: var(--text-muted);
}

.wall-char-count {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.wall-char-count.warn {
    color: #E67E22;
}

.wall-char-count.error {
    color: #E74C3C;
}

.wall-select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.wall-select:focus {
    outline: none;
    border-color: var(--border-focus);
}

.wall-select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

.wall-preview {
    margin-bottom: 20px;
}

.wall-preview label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.wall-preview-box {
    min-height: 60px;
    padding: 14px;
    background: rgba(155, 89, 182, 0.06);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.8;
    word-break: break-word;
    letter-spacing: 0.5px;
}

.wall-preview-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: normal;
}

.wall-modal-footer {
    padding: 0 24px 24px;
}

.wall-publish-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.wall-publish-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.wall-publish-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wall-publish-btn.loading {
    color: transparent;
}

.wall-publish-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: wallSpin 0.6s linear infinite;
}

.wall-error-msg {
    color: #E74C3C;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 12px;
    min-height: 20px;
}

/* Publish button hint */
.wall-btn-wrapper {
    position: relative;
}

.wall-btn-hint {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: opacity 0.3s ease;
}

/* Success state after publishing */
.wall-success-state {
    text-align: center;
    padding: 56px 32px 48px;
    position: relative;
}

.wall-success-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.wall-success-close:hover {
    color: var(--text-primary);
}

.wall-success-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    animation: wallSuccessPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wallSuccessPop {
    0% { transform: scale(0) rotate(-15deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.wall-success-state h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.wall-success-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 32px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.wall-success-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.wall-success-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(155, 89, 182, 0.4);
}

.wall-success-download svg {
    flex-shrink: 0;
}

/* ===== CTA / Download Section ===== */
.wall-cta {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.wall-cta h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.wall-cta p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto 24px;
}

/* ===== Toast ===== */
.wall-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a2e;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.wall-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wall-toast.success {
    border-color: rgba(46, 204, 113, 0.3);
}

.wall-toast.error {
    border-color: rgba(231, 76, 60, 0.3);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .wall-masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .wall-hero {
        padding: 120px 0 40px;
    }

    .wall-hero h1 {
        font-size: 2rem;
    }

    .wall-masonry {
        column-count: 2;
        column-gap: 12px;
    }

    .wall-card {
        padding: 18px;
        margin-bottom: 12px;
    }

    .wall-card-cipher {
        font-size: 1.05rem;
    }

    .wall-modal {
        max-width: 100%;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 480px) {
    .wall-masonry {
        column-count: 1;
    }

    .wall-hero h1 {
        font-size: 1.7rem;
    }

    .wall-hero .hero-subtitle {
        font-size: 0.95rem;
    }
}

/* ===== Turnstile Widget ===== */
.cf-turnstile {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
