/* ===== Material Symbols ===== */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== Navigation Links ===== */
.nav-link {
    color: #64748b;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 0.2s;
    text-decoration: none;
}
.nav-link:hover, .nav-link.active {
    color: #1A237E;
}
.nav-link.active {
    border-bottom: 2px solid #ff607d;
    padding-bottom: 4px;
}

/* ===== Sidebar Links ===== */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #64748b;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border-radius: 0;
}
.sidebar-link:hover {
    background: rgba(228,227,219,0.5);
    transform: translateX(4px);
}
.sidebar-link.active {
    background: #e4e3db;
    color: #af2b3e;
    font-weight: 700;
    border-radius: 8px 0 0 8px;
    border-right: 4px solid #af2b3e;
    transform: translateX(4px);
}

/* ===== Mobile Nav ===== */
.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.mobile-nav-btn.active {
    color: #000666;
}
.mobile-nav-btn.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== Red Thread SVG ===== */
.red-thread {
    stroke: #ff607d;
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 4 2;
}
.red-thread-animated {
    stroke: #ff607d;
    stroke-width: 1.5;
    fill: none;
    stroke-dasharray: 6 3;
    animation: dashMove 20s linear infinite;
}
@keyframes dashMove {
    to { stroke-dashoffset: -100; }
}

/* ===== Polaroid Cards ===== */
.polaroid-tilt-1 { transform: rotate(-1.5deg); }
.polaroid-tilt-2 { transform: rotate(2deg); }
.polaroid-tilt-3 { transform: rotate(-0.5deg); }
.polaroid-tilt-4 { transform: rotate(1deg); }

.polaroid-card {
    background: #ffffff;
    padding: 10px;
    padding-bottom: 36px;
    box-shadow: 0 8px 20px rgba(27,28,23,0.06);
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.polaroid-card:hover {
    transform: translateY(-4px) rotate(0deg) !important;
    box-shadow: 0 16px 40px rgba(27,28,23,0.12);
}

/* ===== Wood/Paper Textures ===== */
.wood-texture {
    background-color: #f5f4ec;
    background-image: repeating-linear-gradient(0deg, rgba(175, 43, 62, 0.03) 0px, rgba(175, 43, 62, 0.03) 1px, transparent 1px, transparent 20px);
}
.vintage-paper {
    background-image: radial-gradient(#c6c5d4 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

/* ===== Notebook Lines ===== */
.notebook-line {
    background-image: linear-gradient(transparent 95%, #c6c5d4 95%);
    background-size: 100% 2rem;
    line-height: 2rem !important;
}

/* ===== Sticky Note ===== */
.sticky-note {
    background: #fff9c4;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: rotate(2deg);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.sticky-note::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 24px;
    background: rgba(255,255,200,0.6);
    backdrop-filter: blur(4px);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ===== Quote Card ===== */
.quote-card {
    background: white;
    padding: 24px;
    border-left: 4px solid #000666;
    transform: rotate(-1deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* ===== Member Polaroid Grid Card ===== */
.member-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}
.member-card:hover {
    z-index: 10;
}
.member-card .photo-wrapper img {
    transition: transform 0.3s ease;
}
.member-card:hover .photo-wrapper img {
    transform: scale(1.05);
}

/* ===== Profile Page ===== */
.profile-polaroid {
    background: #ffffff;
    padding: 12px;
    padding-bottom: 48px;
    box-shadow: 0 8px 30px rgba(27,28,23,0.12);
    transform: rotate(-1deg);
    display: inline-block;
}
.info-field {
    border-bottom: 1px solid rgba(198,197,212,0.3);
    padding-bottom: 8px;
}
.info-field label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 2px;
}

/* ===== Diary Entry ===== */
.diary-entry {
    background: #ffffff;
    padding: 32px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.diary-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.diary-entry.featured {
    border-left: 8px solid #af2b3e;
}
.entry-tag {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 2px;
}
.entry-tag.red {
    background: #ffdada;
    color: #af2b3e;
}
.entry-tag.blue {
    background: #e0e0ff;
    color: #000666;
}

/* ===== Kết nối Yêu Thương ===== */
.to-hong-node {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.3s;
}
.to-hong-node:hover {
    z-index: 20;
    transform: scale(1.15);
}
.to-hong-node .node-photo {
    transition: transform 0.3s, filter 0.3s;
}
.to-hong-node:hover .node-photo {
    filter: drop-shadow(0 4px 12px rgba(255,96,125,0.4));
}
.to-hong-node img {
    object-fit: cover;
    display: block;
}
.to-hong-node .node-label {
    margin-top: 6px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    font-family: 'Be Vietnam Pro', sans-serif;
    color: #1b1c17;
    white-space: nowrap;
}

/* Heart burst animation */
.heart-burst {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    animation: heartFloat 1s ease-out forwards;
    font-size: 20px;
    color: #ff607d;
}
@keyframes heartFloat {
    0% { opacity: 1; transform: translate(0, 0) scale(0.5); }
    50% { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1.2); }
    100% { opacity: 0; transform: translate(var(--tx), calc(var(--ty) - 30px)) scale(0.3); }
}

/* Love arrow style for SVG paths */
.love-thread {
    stroke: #ff607d;
    stroke-width: 0.2;
    fill: none;
    stroke-dasharray: 0.8 0.5;
    stroke-linecap: round;
}
.love-thread-heart {
    stroke: #ff607d;
    stroke-width: 0.25;
    fill: rgba(255,96,125,0.08);
    stroke-dasharray: 0.6 0.4;
}
.love-heart-mid {
    animation: heartBlink 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 1px rgba(255,96,125,0.6));
}
@keyframes heartBlink {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* ===== Event Card ===== */
.event-card {
    background: #eae8e0;
    padding: 32px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s;
}
.event-card:hover {
    background: #e4e3db;
}

/* ===== Form Inputs ===== */
.diary-textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    background: #f5f4ec;
    border: none;
    border-bottom: 2px solid #c6c5d4;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: #1b1c17;
    resize: vertical;
    transition: border-color 0.2s;
    outline: none;
}
.diary-textarea:focus {
    border-bottom-color: #000666;
    background: #ffffff;
}
.input-field {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #c6c5d4;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    color: #1b1c17;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.input-field:focus {
    border-bottom-color: #000666;
    background: rgba(228,227,219,0.3);
}
.input-field::placeholder {
    color: #94a3b8;
}

/* ===== Buttons ===== */
.btn-primary {
    background: #000666;
    color: #ffffff;
    padding: 12px 24px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    background: #af2b3e;
    color: #ffffff;
    padding: 12px 24px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.btn-secondary:hover { opacity: 0.9; }
.btn-secondary:active { transform: scale(0.97); }

.btn-to-hong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #ff607d;
    color: #ff607d;
    background: transparent;
    border-radius: 2px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-to-hong:hover {
    background: #ff607d;
    color: #ffffff;
}
.btn-to-hong .material-symbols-outlined {
    font-size: 16px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== Modal ===== */
#modalOverlay.show {
    display: flex;
}

/* ===== Toast ===== */
#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out both;
}
.animate-fade-in {
    animation: fadeIn 0.4s ease-out both;
}

/* Stagger children animation */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(n+9) { animation-delay: 0.45s; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c6c5d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #767683; }

/* ===== Responsive ===== */
.photo-grid-members {
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
}
@media (max-width: 1400px) {
    .photo-grid-members { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 1024px) {
    .photo-grid-members { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 768px) {
    #fab { bottom: 80px; }
    .photo-grid-members { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }
}
