/* Soul Comments System - Mystical Profile Comments */
/* Ethereal whispers between eternal souls */

/* Comment Author Fallback Styles */
.comment-author-fallback {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    object-fit: cover;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
}

.comment-author-name {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-author-date {
    color: var(--text);
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Soul Comments Section */
.soul-comments {
    margin-top: 3rem;
    padding: 2.5rem;
    border-top: none;
    position: relative;
    background: linear-gradient(135deg, 
        rgba(13, 13, 26, 0.4) 0%, 
        rgba(26, 26, 51, 0.3) 50%,
        rgba(42, 64, 102, 0.2) 100%);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    box-shadow: 
        0 12px 40px rgba(255, 94, 120, 0.15),
        0 4px 20px rgba(255, 202, 40, 0.1),
        inset 0 1px 0 rgba(240, 230, 255, 0.1);
    z-index: 1;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Soul Comments Title */
.soul-comments > h3 {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Cinzel', serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mystical Border Animation */
.soul-comments::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        rgba(255, 94, 120, 0.8) 0%,
        rgba(255, 202, 40, 0.9) 25%,
        rgba(138, 43, 226, 0.7) 50%,
        rgba(255, 202, 40, 0.9) 75%,
        rgba(255, 94, 120, 0.8) 100%);
    border-radius: 20px 20px 0 0;
    animation: soulEnergyFlow 3s ease-in-out infinite;
}

/* Flowing mystical energy animation */
@keyframes soulEnergyFlow {
    0%, 100% { 
        opacity: 0.8; 
        transform: scaleX(1); 
        filter: hue-rotate(0deg);
    }
    33% { 
        opacity: 1; 
        transform: scaleX(1.02); 
        filter: hue-rotate(30deg);
    }
    66% { 
        opacity: 0.9; 
        transform: scaleX(1.01); 
        filter: hue-rotate(-30deg);
    }
}

/* Light Mode Soul Comments Override */
body.light-theme .soul-comments {
    background: linear-gradient(135deg, 
        rgba(248, 250, 252, 0.9) 0%, 
        rgba(241, 245, 249, 0.8) 50%,
        rgba(226, 232, 240, 0.7) 100%);
    border: 2px solid #e2e8f0;
    box-shadow: 
        0 8px 25px rgba(15, 23, 42, 0.08),
        0 3px 10px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.light-theme .soul-comments::before {
    background: linear-gradient(90deg,
        rgba(220, 38, 38, 0.8) 0%,
        rgba(239, 68, 68, 0.9) 25%,
        rgba(185, 28, 28, 0.8) 50%,
        rgba(239, 68, 68, 0.9) 75%,
        rgba(220, 38, 38, 0.8) 100%);
}

body.light-theme .soul-comments > h3 {
    color: #dc2626;
    text-shadow: none;
}

body.light-theme .soul-comments h3 {
    color: #dc2626;
    text-shadow: none;
}

/* Comments section styling for light mode */
body.light-theme .comments-section {
    background: transparent;
}

body.light-theme .comments-title {
    color: #dc2626;
}

body.light-theme .comment {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 1rem;
}

body.light-theme .comment-header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

body.light-theme .comment-content {
    color: #334155;
    line-height: 1.6;
}

body.light-theme .comment-form-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

body.light-theme .comment-input {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    color: #0f172a;
}

body.light-theme .comment-input:focus {
    border-color: #dc2626;
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

body.light-theme .btn.btn-primary,
body.light-theme button[id$="-submit"] {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border: none;
    font-weight: 600;
}

body.light-theme .btn.btn-primary:hover,
body.light-theme button[id$="-submit"]:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

body.light-theme .no-comments {
    color: #64748b;
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
}

body.light-theme .no-comments i {
    color: #dc2626;
}

/* Soul Comments Title */
.soul-comments h3 {
    color: var(--text);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-shadow: 
        0 0 15px rgba(255, 94, 120, 0.6),
        0 0 30px rgba(255, 202, 40, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.7);
    justify-content: center;
    letter-spacing: 1px;
    background: linear-gradient(135deg, 
        var(--text) 0%,
        rgba(255, 94, 120, 0.95) 30%,
        rgba(255, 202, 40, 0.9) 50%,
        rgba(138, 43, 226, 0.8) 70%,
        var(--text) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShimmer 4s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { 
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% { 
        background-position: 100% 50%;
        filter: brightness(1.2);
    }
}

.soul-comments h3 i {
    color: var(--accent);
    font-size: 1.3rem;
    text-shadow: 
        0 0 12px rgba(255, 94, 120, 0.8),
        0 0 24px rgba(255, 202, 40, 0.5),
        0 0 36px rgba(138, 43, 226, 0.3);
    animation: soulIconPulse 2.5s ease-in-out infinite;
    -webkit-text-fill-color: initial;
}

@keyframes soulIconPulse {
    0%, 100% { 
        opacity: 0.9; 
        transform: scale(1) rotate(0deg); 
        filter: hue-rotate(0deg);
    }
    25% { 
        opacity: 1; 
        transform: scale(1.1) rotate(2deg); 
        filter: hue-rotate(30deg);
    }
    50% { 
        opacity: 0.95; 
        transform: scale(1.05) rotate(0deg); 
        filter: hue-rotate(60deg);
    }
    75% { 
        opacity: 1; 
        transform: scale(1.1) rotate(-2deg); 
        filter: hue-rotate(30deg);
    }
}

/* Enhanced Soul Comments Container */
.soul-comments .comments-section {
    background: transparent;
    border: none;
    padding: 0;
}

.soul-comments .comments-title {
    display: none !important; /* Hide duplicate title */
}

/* Soul Comment Cards */
.soul-comments .comment {
    background: linear-gradient(135deg, 
        rgba(26, 26, 51, 0.98) 0%, 
        rgba(42, 64, 102, 0.9) 40%,
        rgba(58, 46, 84, 0.85) 70%,
        rgba(26, 26, 51, 0.95) 100%);
    border: 2px solid rgba(255, 94, 120, 0.4);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 6px solid var(--accent);
    box-shadow: 
        0 8px 32px rgba(255, 94, 120, 0.2),
        0 4px 16px rgba(255, 202, 40, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(240, 230, 255, 0.1);
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Mystical glow effect on comment border */
.soul-comments .comment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(255, 94, 120, 0.6) 0%,
        rgba(255, 202, 40, 0.8) 25%,
        rgba(138, 43, 226, 0.7) 50%,
        rgba(255, 202, 40, 0.8) 75%,
        rgba(255, 94, 120, 0.6) 100%);
    border-radius: 16px 16px 0 0;
    animation: commentGlow 3s ease-in-out infinite;
}

@keyframes commentGlow {
    0%, 100% { opacity: 0.7; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.02); }
}

/* Soul whisper hover effect */
.soul-comments .comment:hover {
    background: linear-gradient(135deg, 
        rgba(42, 64, 102, 1) 0%, 
        rgba(58, 46, 84, 0.95) 40%,
        rgba(74, 35, 102, 0.9) 70%,
        rgba(42, 64, 102, 0.98) 100%);
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255, 94, 120, 0.6);
    box-shadow: 
        0 12px 40px rgba(255, 94, 120, 0.25),
        0 6px 20px rgba(255, 202, 40, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(240, 230, 255, 0.15);
}

/* Enhanced Soul Comment Header */
.soul-comments .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: none;
    position: relative;
}

.soul-comments .comment-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 94, 120, 0.4) 20%,
        rgba(255, 202, 40, 0.6) 40%,
        rgba(138, 43, 226, 0.5) 60%,
        rgba(255, 202, 40, 0.6) 80%,
        transparent 100%);
    border-radius: 2px;
    animation: soulDividerFlow 2.5s ease-in-out infinite;
}

@keyframes soulDividerFlow {
    0%, 100% { 
        opacity: 0.7; 
        transform: scaleX(1);
        filter: blur(0px);
    }
    50% { 
        opacity: 1; 
        transform: scaleX(1.05);
        filter: blur(0.5px);
    }
}

/* Soul Author Styling */
.soul-comments .comment .author-name {
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
    font-family: 'Cinzel', serif;
    transition: all 0.3s ease;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.5),
        0 0 8px rgba(255, 94, 120, 0.3);
    background: linear-gradient(135deg, 
        var(--text) 0%,
        rgba(255, 94, 120, 0.9) 50%,
        var(--text) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.soul-comments .comment .author-name:hover {
    transform: translateX(3px) scale(1.02);
    text-shadow: 
        0 0 12px rgba(255, 94, 120, 0.7),
        0 0 24px rgba(255, 202, 40, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.6);
    filter: brightness(1.2);
}

/* Ethereal Avatar Glow */
.soul-comments .comment .author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    box-shadow: 
        0 0 12px rgba(255, 94, 120, 0.4),
        0 0 24px rgba(255, 202, 40, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.soul-comments .comment .author-avatar:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 16px rgba(255, 94, 120, 0.6),
        0 0 32px rgba(255, 202, 40, 0.3),
        0 6px 16px rgba(0, 0, 0, 0.5);
}

/* Soul Comment Content */
.soul-comments .comment-content {
    line-height: 1.9;
    white-space: pre-wrap;
    color: var(--text);
    font-size: 1.1rem;
    text-align: left;
    hyphens: auto;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.4),
        0 0 6px rgba(255, 94, 120, 0.1);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.75rem 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.soul-comments .comment-content:hover {
    text-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(255, 94, 120, 0.2),
        0 0 20px rgba(255, 202, 40, 0.1);
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* Soul Comment Form */
.soul-comments .comment-form-container {
    margin-top: 2rem;
    background: linear-gradient(135deg, 
        rgba(26, 26, 51, 0.98) 0%, 
        rgba(42, 64, 102, 0.95) 50%,
        rgba(58, 46, 84, 0.9) 100%);
    border: 2px solid rgba(255, 94, 120, 0.4);
    border-radius: 16px;
    padding: 2rem;
    border-left: 6px solid var(--accent);
    backdrop-filter: blur(12px);
    box-shadow: 
        0 12px 40px rgba(255, 94, 120, 0.2),
        0 6px 20px rgba(255, 202, 40, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(240, 230, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.soul-comments .comment-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(255, 94, 120, 0.6) 0%,
        rgba(255, 202, 40, 0.8) 50%,
        rgba(138, 43, 226, 0.6) 100%);
    animation: formGlow 2s ease-in-out infinite;
}

@keyframes formGlow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Soul Comment Input */
.soul-comments .comment-input {
    width: 100%;
    min-height: 120px;
    padding: 1.25rem;
    border: 2px solid rgba(255, 94, 120, 0.5);
    border-radius: 12px;
    background: rgba(13, 13, 26, 0.95);
    color: var(--text);
    resize: vertical;
    margin-bottom: 1.5rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(240, 230, 255, 0.08);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.soul-comments .comment-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 
        0 0 0 4px rgba(255, 94, 120, 0.25),
        0 8px 32px rgba(255, 94, 120, 0.3),
        0 4px 16px rgba(255, 202, 40, 0.1),
        inset 0 1px 0 rgba(240, 230, 255, 0.12);
    background: rgba(26, 26, 51, 0.98);
    transform: translateY(-1px);
}

.soul-comments .comment-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.9;
    text-shadow: none;
    font-style: italic;
}

/* Enhanced Soul Loading and Empty States */
.soul-comments .loading-comments, 
.soul-comments .no-comments {
    text-align: center;
    padding: 4rem 3rem;
    color: var(--text-secondary);
    background: linear-gradient(135deg, 
        rgba(26, 26, 51, 0.98) 0%, 
        rgba(42, 64, 102, 0.9) 50%,
        rgba(58, 46, 84, 0.85) 100%);
    border: 2px solid rgba(255, 94, 120, 0.4);
    border-radius: 20px;
    margin: 3rem 0;
    backdrop-filter: blur(12px);
    box-shadow: 
        0 12px 40px rgba(255, 94, 120, 0.2),
        0 6px 20px rgba(255, 202, 40, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(240, 230, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.soul-comments .loading-comments i, 
.soul-comments .no-comments i {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--accent);
    text-shadow: 
        0 0 20px rgba(255, 94, 120, 0.6),
        0 0 40px rgba(255, 202, 40, 0.4),
        0 0 60px rgba(138, 43, 226, 0.2);
    animation: soulStatePulse 2.5s ease-in-out infinite;
}

@keyframes soulStatePulse {
    0%, 100% { 
        opacity: 0.8; 
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    33% { 
        opacity: 1; 
        transform: scale(1.1) rotate(5deg);
        filter: hue-rotate(30deg);
    }
    66% { 
        opacity: 0.9; 
        transform: scale(1.05) rotate(-5deg);
        filter: hue-rotate(-30deg);
    }
}

.soul-comments .loading-comments {
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Cinzel', serif;
}

.soul-comments .loading-comments .loading-text {
    opacity: 0.95;
    animation: soulLoadingPulse 1.8s ease-in-out infinite;
    font-style: italic;
}

@keyframes soulLoadingPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.soul-comments .no-comments {
    font-size: 1.15rem;
    font-style: italic;
    opacity: 0.9;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}

/* Light theme soul comments */
body.light-theme .soul-comments {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 246, 255, 0.9) 50%,
        rgba(254, 252, 255, 0.85) 100%);
    box-shadow: 
        0 8px 32px rgba(214, 45, 77, 0.12),
        0 4px 16px rgba(212, 175, 55, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-theme .soul-comments .comment {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 246, 255, 0.95) 50%,
        rgba(254, 252, 255, 0.9) 100%);
    border-color: rgba(214, 45, 77, 0.25);
    color: var(--ink);
    box-shadow: 
        0 6px 24px rgba(214, 45, 77, 0.1),
        0 3px 12px rgba(212, 175, 55, 0.05),
        0 2px 8px rgba(44, 24, 16, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-theme .soul-comments .comment:hover {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(254, 252, 255, 0.98) 50%,
        rgba(248, 246, 255, 0.95) 100%);
    border-color: rgba(214, 45, 77, 0.35);
    box-shadow: 
        0 8px 32px rgba(214, 45, 77, 0.15),
        0 4px 16px rgba(212, 175, 55, 0.08),
        0 3px 12px rgba(44, 24, 16, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

body.light-theme .soul-comments .comment-content,
body.light-theme .soul-comments .comment .author-name {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

body.light-theme .soul-comments .comment-form-container {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 246, 255, 0.9) 100%);
    border-color: rgba(214, 45, 77, 0.2);
    box-shadow: 
        0 8px 24px rgba(214, 45, 77, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.light-theme .soul-comments .comment-input {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(214, 45, 77, 0.25);
    color: var(--ink);
}

body.light-theme .soul-comments .comment-input:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 
        0 0 0 3px rgba(212, 175, 55, 0.2),
        0 6px 20px rgba(212, 175, 55, 0.15);
}