@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* Crystallized App Style - SoulsNote Letter Edition (White + Pink Theme) */
:root {
    --bg-dark: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --primary: #f43f5e;
    --primary-glow: rgba(244, 63, 94, 0.2);
    --primary-dark: #e01b4c;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(244, 63, 94, 0.15);
    --glass-hover: rgba(244, 63, 94, 0.08);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --letter-bg: rgba(255, 255, 255, 0.9);
    --gold-accent: #d97706;
    --gold-glow: rgba(217, 119, 6, 0.2);
    --crystal-shine: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(244, 63, 94, 0.06) 50%, rgba(255, 255, 255, 0) 100%);
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6, .brand-logo, .hero-title, .section-title, .title, .username {
    font-family: 'Outfit', sans-serif;
}

input, button, select, textarea {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: #ffffff;
    background-image: linear-gradient(145deg, #fff1f5 0%, #ffffff 50%, #fdf2f8 100%);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding-bottom: 90px;
    position: relative;
}

.container, .container-fluid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Custom Heart Radio Component (.heart-radio-input, .option-radio) */
.heart-radio-input,
.option-radio {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    float: none !important;
    position: relative !important;
    flex-shrink: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-60 -60 632 632'%3E%3Cpath fill='none' stroke='%23f43f5e' stroke-width='46' stroke-linecap='round' stroke-linejoin='round' d='M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease !important;
    vertical-align: middle;
    display: inline-block !important;
    overflow: visible !important;
    margin: 0 !important;
}

.heart-radio-input:hover,
.option-radio:hover {
    transform: scale(1.2) !important;
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.6)) !important;
}

.heart-radio-input:checked,
.option-radio:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-60 -60 632 632'%3E%3Ccircle cx='256' cy='256' r='270' fill='%23f43f5e' fill-opacity='0.2'/%3E%3Cpath fill='%23f43f5e' stroke='%23f43f5e' stroke-width='20' stroke-linecap='round' stroke-linejoin='round' d='M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z'/%3E%3C/svg%3E") !important;
    filter: drop-shadow(0 0 12px rgba(244, 63, 94, 0.8)) !important;
    animation: heartRadioPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes heartRadioPop {
    0% {
        transform: scale(0.7);
    }

    50% {
        transform: scale(1.35);
    }

    100% {
        transform: scale(1);
    }
}

.container {
    max-width: 960px;
    margin: auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}



/* Global Button Standardization */
.btn, button.btn, a.btn, input[type="submit"].btn, input[type="button"].btn,
.btn-pink-primary, .btn-pink-outline, .btn-pink-tab, .btn-theme-primary {
    border-radius: 12px !important;
}

/* Premium Buttons */
.btn-premium {
    padding: 12px 28px;
    border-radius: 50px !important;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
}

.btn-primary-glow {
    background: linear-gradient(135deg, var(--primary) 0%, #fb7185 100%);
    color: white;
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary-glow:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px var(--primary);
    color: white;
}

.btn-outline-glow {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-outline-glow:hover {
    background: var(--glass-hover);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.8rem;
}

/* 3D Perspective Tilt Base Container */
.tilt-card-wrapper {
    perspective: 1000px;
    transform-style: revert-layer;
}

/* Master Letter Profile Card */
.profile-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 245, 0.98) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 28px;
    padding: 38px 32px 32px 32px;
    margin-bottom: 45px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 20px 50px rgba(244, 63, 94, 0.1), inset 0 0 30px rgba(255, 255, 255, 0.8);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
    transform-style: preserve-3d;
}

.profile-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--gold-accent), var(--primary), transparent);
    background-size: 200% 100%;
    animation: shimmerBorder 4s infinite linear;
}

@keyframes shimmerBorder {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Letter Stitched Lines Border Overlay */
.letter-stitch-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed rgba(244, 63, 94, 0.2);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

/* Wax Seal Badge Top Right */
.wax-seal-badge {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, #f43f5e 0%, #e11d48 70%, #9f1239 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 6px 18px rgba(244, 63, 94, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    transform: translateZ(30px) rotate(12deg);
    transition: all 0.4s ease;
    z-index: 3;
    cursor: pointer;
}

.wax-seal-badge:hover {
    transform: translateZ(40px) rotate(0deg) scale(1.15);
    box-shadow: 0 10px 25px rgba(244, 63, 94, 0.7), inset 0 2px 6px rgba(255, 255, 255, 0.6);
}

.wax-seal-badge::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1.5px dashed rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

/* Postmark Stamp Top Left */
.postmark-stamp {
    position: absolute;
    top: 22px;
    left: 25px;
    border: 2px solid rgba(244, 63, 94, 0.25);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    transform: translateZ(25px) rotate(-8deg);
    pointer-events: none;
    z-index: 3;
}

.postmark-stamp i {
    color: var(--primary);
    margin-right: 4px;
}

/* Profile Avatar & 3D Glowing Orbit Ring with Heart SVG Frame */
.profile-img-wrapper {
    position: relative;
    margin-bottom: 22px;
    transform: translateZ(35px);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-heart-backdrop {
    position: absolute;
    width: 170px;
    height: 170px;
    pointer-events: none;
    z-index: 0;
    filter: drop-shadow(0 4px 12px rgba(244, 63, 94, 0.15));
    animation: floatHeartBg 4s ease-in-out infinite alternate;
}

@keyframes floatHeartBg {
    0% { transform: scale(0.98); opacity: 0.7; }
    100% { transform: scale(1.05); opacity: 1; }
}

.avatar-orbit-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px dashed rgba(244, 63, 94, 0.65);
    animation: orbitRotate 10s linear infinite;
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.15);
    z-index: 1;
}

.avatar-orbit-ring::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #f43f5e;
    border-radius: 50%;
    box-shadow: 0 0 10px #f43f5e, 0 0 18px rgba(244, 63, 94, 0.8);
}

@keyframes orbitRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.profile-img-wrapper img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 3.5px solid #ffffff;
    padding: 3px;
    background: #ffffff;
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.25), 0 10px 20px rgba(244, 63, 94, 0.12);
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.profile-card:hover .profile-img-wrapper img {
    transform: scale(1.06);
    box-shadow: 0 0 35px var(--primary);
}

.username {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #1e293b;
    transform: translateZ(25px);
    z-index: 2;
    letter-spacing: -0.01em;
}

.user-tag {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 26px;
    transform: translateZ(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.user-tag .tag-badge {
    background: #fce7f3;
    border: 1px solid rgba(244, 63, 94, 0.22);
    color: #e11d48;
    padding: 4px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.06);
}

/* Quick Actions in 3D Profile Card */
.quick-actions {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 540px;
    position: relative;
    z-index: 10;
}

.action-btn {
    flex: 1;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 10;
    cursor: pointer !important;
    pointer-events: auto !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.08);
}

.action-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 240, 245, 0.95);
    border-color: rgba(244, 63, 94, 0.4);
    transform: translateY(-3px) scale(1.02);
    color: var(--primary);
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.15);
    text-decoration: none;
}

.action-btn:hover i {
    transform: scale(1.2) rotate(10deg);
}

.action-btn.primary {
    background: linear-gradient(135deg, #f43f5e 0%, #e01b4c 100%);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.35);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
    color: #ffffff;
    box-shadow: 0 12px 35px rgba(244, 63, 94, 0.45);
}

.action-btn.primary i {
    animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }
}

/* Section Title with Letter Theme */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.section-title i {
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

/* Stats Shards with 3D Mouse Tilt */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 45px;
    perspective: 1000px;
}

.crystal-stat {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 22px 20px;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    will-change: transform;
    transform-style: preserve-3d;
    box-shadow: 0 10px 25px rgba(244, 63, 94, 0.08);
    cursor: default;
}

.crystal-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255, 46, 99, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.crystal-stat:hover {
    border-color: rgba(244, 63, 94, 0.4);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 35px rgba(244, 63, 94, 0.15), 0 0 20px var(--primary-glow);
}

.crystal-stat:hover::before {
    opacity: 1;
}

.stat-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease;
    transform: translateZ(20px);
}

.crystal-stat:hover .stat-icon-wrapper {
    background: var(--primary);
    transform: translateZ(30px) rotate(-8deg) scale(1.1);
    box-shadow: 0 0 15px var(--primary);
}

.stat-icon {
    font-size: 1.3rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

.crystal-stat:hover .stat-icon {
    color: white;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    display: block;
    line-height: 1.1;
    margin-bottom: 4px;
    color: #1e293b;
    transform: translateZ(15px);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transform: translateZ(10px);
}

/* Dashboard Letter Navigation Tabs */
.dashboard-tabs-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.8);
    padding: 6px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(15px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.06);
}

.nav-link-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 18px;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.nav-link-btn:hover {
    color: #1e293b;
    background: rgba(244, 63, 94, 0.06);
}

.nav-link-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #e01b4c 100%);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Letter Cards Container & Sealed Letter Style */
.letter-cards-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    perspective: 1000px;
}

.letter-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 248, 250, 0.96) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.08);
    position: relative;
    overflow: hidden;
}

.letter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary);
    opacity: 0.6;
    transition: width 0.3s ease, opacity 0.3s ease;
}

.letter-card:hover {
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 15px 40px rgba(244, 63, 94, 0.15);
}

.letter-card:hover::before {
    width: 8px;
    opacity: 1;
}

.letter-card-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.letter-envelope-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: transform 0.3s ease, background 0.3s ease;
}

.letter-card:hover .letter-envelope-icon {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(244, 63, 94, 0.2);
}

.letter-info h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1e293b;
}

.letter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.letter-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.letter-meta span i {
    color: var(--primary);
}

.letter-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--glass-border);
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 18px var(--primary-glow);
}

/* Badges */
.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 6px;
}

.status-published {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-draft {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-captured {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.letter-card.border-success {
    border-color: rgba(16, 185, 129, 0.35) !important;
}

/* Empty state glass box */
.glass-empty-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px dashed var(--glass-border);
    border-radius: 24px;
    padding: 50px 20px;
    text-align: center;
}

/* RESPONSIVE OVERRIDES FOR MOBILE */
@media (max-width: 991px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }

    .profile-card {
        padding: 26px 18px 24px 18px;
        margin-bottom: 30px;
        border-radius: 22px;
    }

    .wax-seal-badge {
        top: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .postmark-stamp {
        top: 14px;
        left: 14px;
        font-size: 0.55rem;
        padding: 2px 6px;
    }

    .username {
        font-size: 1.6rem;
    }

    .quick-actions {
        flex-direction: column;
        gap: 10px;
    }

    .action-btn {
        width: 100%;
        padding: 14px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .crystal-stat {
        padding: 16px;
        border-radius: 18px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .dashboard-tabs-container {
        max-width: 100%;
        border-radius: 16px;
        padding: 4px;
    }

    .nav-link-btn {
        font-size: 0.78rem;
        padding: 10px 8px;
    }

    .letter-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px;
    }

    .letter-card-left {
        align-items: flex-start;
    }

    .letter-actions {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 12px;
    }

    .letter-actions .btn-icon {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .crystal-stat {
        padding: 14px 12px;
    }

    .stat-icon-wrapper {
        width: 38px;
        height: 38px;
        margin-bottom: 10px;
    }
}

/* ==========================================
   IMAGINATIVE 3D ICON HOVER MICRO-ANIMATIONS
   ========================================== */

/* 1. Stat Card Icons Hover Animations */
.crystal-stat:hover .fa-paper-plane {
    animation: flyPlane 1.2s cubic-bezier(0.25, 1, 0.5, 1) infinite alternate !important;
}

@keyframes flyPlane {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(6px, -8px) rotate(-18deg) scale(1.25);
        filter: drop-shadow(0 0 10px var(--primary));
    }

    100% {
        transform: translate(4px, -12px) rotate(-12deg) scale(1.2);
        filter: drop-shadow(0 0 15px var(--primary));
    }
}

.crystal-stat:hover .fa-heart,
.crystal-stat:hover .fa-heart-pulse {
    animation: heartbeatBounce 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) infinite !important;
}

@keyframes heartbeatBounce {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px var(--primary));
    }

    14% {
        transform: scale(1.35);
        filter: drop-shadow(0 0 15px var(--primary));
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.28);
        filter: drop-shadow(0 0 10px var(--primary));
    }

    70% {
        transform: scale(1);
    }
}

.crystal-stat:hover .fa-fire {
    animation: flameFlicker 0.9s ease-in-out infinite alternate !important;
}

@keyframes flameFlicker {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }

    30% {
        transform: translateY(-5px) scale(1.25) rotate(-6deg);
        filter: drop-shadow(0 0 12px #ff4500);
    }

    60% {
        transform: translateY(-2px) scale(1.3) rotate(6deg);
        filter: drop-shadow(0 0 18px var(--primary));
    }

    100% {
        transform: translateY(-6px) scale(1.35) rotate(-3deg);
        filter: drop-shadow(0 0 20px #ff2e63);
    }
}

.crystal-stat:hover .fa-hourglass-half {
    animation: hourglassSpin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite alternate !important;
}

@keyframes hourglassSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(180deg) scale(1.25);
        filter: drop-shadow(0 0 12px var(--gold-accent));
    }
}

/* 2. Quick Action Buttons Icon Hover Animations */
.action-btn.primary:hover i,
.action-btn:hover .fa-pen-fancy {
    animation: writeMotion 1s ease-in-out infinite !important;
}

@keyframes writeMotion {

    0%,
    100% {
        transform: rotate(0deg) translate(0, 0) scale(1);
    }

    25% {
        transform: rotate(-15deg) translate(-3px, -3px) scale(1.2);
    }

    50% {
        transform: rotate(12deg) translate(3px, 2px) scale(1.25);
    }

    75% {
        transform: rotate(-8deg) translate(-2px, -2px) scale(1.2);
    }
}

.action-btn:hover .fa-sliders,
.action-btn:hover .fa-sliders-h {
    animation: sliderShift 1s ease-in-out infinite alternate !important;
}

@keyframes sliderShift {
    0% {
        transform: translateX(0) scale(1);
    }

    50% {
        transform: translateX(-4px) scale(1.2) rotate(-10deg);
    }

    100% {
        transform: translateX(4px) scale(1.2) rotate(10deg);
    }
}

/* 3. Envelope Icon Hover in Letter Cards */
.letter-card:hover .letter-envelope-icon i {
    animation: envelopePulse 1s ease-in-out infinite alternate !important;
}

@keyframes envelopePulse {
    0% {
        transform: scale(1) rotate(0deg);
    }

    100% {
        transform: scale(1.25) rotate(-10deg);
        filter: drop-shadow(0 0 10px var(--primary));
    }
}

/* 4. Action Icons in Letter Card Buttons */
.btn-icon:hover .fa-comments {
    animation: bounceComments 0.6s ease infinite alternate !important;
}

@keyframes bounceComments {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-5px) scale(1.25) rotate(-8deg);
    }
}

.btn-icon:hover .fa-eye {
    animation: eyeWiden 0.8s ease infinite alternate !important;
}

@keyframes eyeWiden {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.3) rotate(6deg);
    }
}

.btn-icon:hover .fa-copy,
.btn-icon:hover .fa-link {
    animation: linkSnap 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate !important;
}

@keyframes linkSnap {
    0% {
        transform: rotate(0deg) scale(1);
    }

    100% {
        transform: rotate(45deg) scale(1.25);
    }
}

.btn-icon:hover .fa-trash-alt,
.btn-icon:hover .fa-trash {
    animation: trashShake 0.4s ease-in-out infinite alternate !important;
}

@keyframes trashShake {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(-14deg) translateY(-3px) scale(1.2);
    }

    100% {
        transform: rotate(14deg) translateY(-3px) scale(1.2);
    }
}

/* ==========================================================================
   VARIATION 2A: CRISP PURE WHITE PILL TOAST NOTIFICATIONS (SoulsNote Theme)
   ========================================================================== */
#toast-container {
    position: fixed !important;
    top: 24px !important;
    right: 24px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 12px !important;
    max-width: 440px !important;
    width: auto !important;
    pointer-events: none !important;
}

#toast-container > div {
    pointer-events: auto !important;
    background: #ffffff !important;
    border-radius: 9999px !important; /* Pure Pill Capsule */
    padding: 10px 18px 10px 14px !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(255, 77, 121, 0.06) !important;
    display: grid !important;
    grid-template-columns: 36px 1fr 26px !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 2px !important;
    border: 1px solid rgba(255, 180, 204, 0.5) !important;
    width: auto !important;
    min-width: 280px !important;
    max-width: 420px !important;
    height: auto !important;
    min-height: 52px !important;
    max-height: 72px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    background-image: none !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease !important;
    overflow: hidden !important;
    animation: slideInToast 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#toast-container > div[style*="display: none"],
#toast-container > div[style*="display:none"] {
    display: none !important;
}

#toast-container > div.hiding-toast,
.hiding-toast {
    animation: fadeOutToast 0.3s cubic-bezier(0.4, 0, 1, 1) forwards !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes fadeOutToast {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
}

#toast-container > div:hover {
    box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(255, 77, 121, 0.1) !important;
    transform: translateY(-2px) !important;
}

/* Vibrant Icon Badge */
#toast-container > div::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome', sans-serif;
    font-weight: 900;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    justify-self: center !important;
    box-sizing: border-box !important;
}

#toast-container > .toast-success::before {
    content: '\f00c';
    background: #10b981 !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3) !important;
}

#toast-container > .toast-error::before {
    content: '\f00d';
    background: #f43f5e !important;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3) !important;
}

#toast-container > .toast-info::before {
    content: '\f0c5';
    background: #0ea5e9 !important;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3) !important;
}

#toast-container > .toast-warning::before {
    content: '\f071';
    background: #f59e0b !important;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3) !important;
}

#toast-container .toast-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.94rem !important;
    font-weight: 700 !important;
    color: #0f172a !important; /* Sharp, high contrast */
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
}

#toast-container .toast-message {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 0.88rem !important;
    color: #374151 !important; /* Clear dark slate text */
    font-weight: 500 !important;
    line-height: 1.35 !important;
    word-break: break-word !important;
    margin: 0 !important;
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
}

/* When a non-empty title exists, push message to row 2 */
#toast-container > div:has(.toast-title:not(:empty)) .toast-message {
    grid-row: 2 !important;
    font-size: 0.82rem !important;
    color: #64748b !important;
}

/* Circular Close Button */
#toast-container .toast-close-button {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #94a3b8 !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
    position: static !important;
    float: none !important;
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    justify-self: center !important;
    opacity: 1 !important;
    text-shadow: none !important;
    line-height: 1 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    box-sizing: border-box !important;
}

#toast-container .toast-close-button:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Remove default progress bar for clean pill curve */
#toast-container > div > .toast-progress {
    display: none !important;
}

@media (max-width: 768px) {
    #toast-container {
        top: 16px !important;
        right: 16px !important;
        left: 16px !important;
        width: auto !important;
        max-width: none !important;
    }
    #toast-container > div {
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   MODERN IN-FORM ALERT BANNERS (Above Input Fields)
   ========================================================================== */
.form-alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInDown 0.3s ease;
    text-align: left;
}

.form-alert-error {
    background: rgba(255, 46, 99, 0.1) !important;
    border: 1px solid rgba(255, 46, 99, 0.4) !important;
    color: #ff2e63 !important;
    box-shadow: 0 4px 15px rgba(255, 46, 99, 0.15);
}

.form-alert-error .alert-icon {
    font-size: 1.15rem;
    color: #ff2e63;
    flex-shrink: 0;
}

.form-alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #10b981 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.form-alert-success .alert-icon {
    font-size: 1.15rem;
    color: #10b981;
    flex-shrink: 0;
}

.form-alert-info {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    color: #3b82f6 !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.form-alert-info .alert-icon {
    font-size: 1.15rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.form-alert-banner .alert-content {
    flex: 1;
    line-height: 1.45;
}

/* Universal Modal Close Button (X) */
.btn-close-custom,
.modal .btn-close {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    border: none !important;
    color: #64748b !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    opacity: 1 !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.btn-close-custom *,
.modal .btn-close * {
    pointer-events: none !important;
}

.btn-close-custom:hover,
.modal .btn-close:hover {
    background: #ffe4e6 !important;
    color: #f43f5e !important;
    transform: scale(1.08) !important;
}

/* Responsive Grid & Card Adjustments for Mobile Containment */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    .crystal-stat {
        padding: 16px 12px !important;
        border-radius: 16px !important;
    }
    .stat-value {
        font-size: 1.4rem !important;
    }
    .stat-label {
        font-size: 0.68rem !important;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .profile-card {
        padding: 24px 16px !important;
        border-radius: 20px !important;
    }
    .quick-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .letter-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
        padding: 16px 18px !important;
        border-radius: 18px !important;
    }
    .letter-actions {
        width: 100% !important;
        justify-content: flex-end !important;
    }
}