:root {
    --primary: #ff99ac;
    --secondary: #ff477e;
    --text: #643a4a;
    --bg: #fff0f5;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow: 0 8px 30px rgba(255, 71, 126, 0.2);
    --gold: #ffd700;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

#sakura-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.section {
    display: none;
}

.section.active-section {
    display: block;
    animation: fadeInTab 0.4s ease-out;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- MÀN HÌNH KHÓA --- */

#lock-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    padding-bottom: 20px;
}

.lock-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    padding: 15px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lock-widget {
    text-align: center;
    margin-bottom: 10px;
}

.lock-time {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 4px 15px rgba(255, 71, 126, 0.2);
}

.lock-date {
    font-size: 1rem;
    margin-top: 5px;
    font-weight: 700;
    letter-spacing: 1px;
}

@keyframes heartBeatGlow {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.pass-display {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.pass-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    transition: 0.3s;
}

.pass-dot.active {
    background: var(--secondary);
    box-shadow: 0 0 10px rgba(255, 71, 126, 0.5);
}

.numpad {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

.num-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.num-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--secondary);
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: var(--shadow);
}

.num-btn:active {
    background: #ffe6eb;
    transform: scale(0.95);
}

.num-dummy {
    visibility: hidden;
    pointer-events: none;
}

.num-del {
    font-size: 1.3rem;
    color: var(--secondary);
}

#app {
    display: none;
    width: 100%;
    height: 100%;
    background: var(--bg);
    overflow-y: auto;
    position: relative;
    z-index: 1;
    padding: 15px 15px 120px 15px;
    margin: 0 auto;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.greeting {
    font-family: 'Pacifico', cursive;
    font-size: 1.6rem;
    color: var(--secondary);
    margin-bottom: 15px;
    min-height: 40px;
    text-align: center;
}

.photo-slider {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 5px;
    scroll-snap-type: x mandatory;
    margin-bottom: 20px;
}

.slide-item {
    min-width: 85%;
    height: 200px;
    border-radius: 22px;
    scroll-snap-align: center;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 3px solid white;
    position: relative;
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 15px;
    color: var(--secondary);
    font-weight: bold;
    font-size: 0.85rem;
}

.card {
    background: var(--glass);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.9);
    animation: slideUp 0.5s ease;
    backdrop-filter: blur(10px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fab-add {
    width: 32px;
    height: 32px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.vip-card-container {
    perspective: 1000px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.vip-card {
    width: 100%;
    max-width: 380px;
    height: 220px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 20px;
    padding: 20px;
    color: white;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 71, 126, 0.4);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vip-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(30deg);
    animation: shimmer 4s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-family: sans-serif;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.card-rank {
    color: var(--gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-chip {
    width: 50px;
    height: 38px;
    background: linear-gradient(135deg, #e6c888, #c69f54);
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
    margin: 5px 0;
}

.chip-line {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.2);
    position: absolute;
}

.chip-line:nth-child(1) {
    top: 33%;
}

.chip-line:nth-child(2) {
    top: 66%;
}

.chip-line:nth-child(3) {
    left: 33%;
    height: 100%;
    width: 1px;
    top: 0;
}

.chip-line:nth-child(4) {
    left: 66%;
    height: 100%;
    width: 1px;
    top: 0;
}

.card-number {
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

.card-info {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    font-family: sans-serif;
    text-transform: uppercase;
    font-size: 0.7rem;
    position: relative;
    z-index: 2;
}

.card-info .label {
    opacity: 0.8;
    font-size: 0.6rem;
    margin-bottom: 2px;
    display: block;
}

.card-info .name,
.card-info .date {
    font-weight: bold;
    font-size: 0.95rem;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.card-title {
    position: absolute;
    bottom: 18px;
    right: 20px;
    font-size: 0.75rem;
    opacity: 0.9;
    font-family: sans-serif;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
}

.timeline-mini {
    margin-top: 15px;
    max-height: 350px;
    overflow-y: auto;
}

.tl-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.tl-time {
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--secondary);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
}

.tl-card {
    background: white;
    padding: 10px 12px;
    border-radius: 12px 12px 12px 0;
    flex: 1;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 71, 126, 0.1);
    position: relative;
    color: #555;
}

.btn-del {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.8rem;
    color: #ccc;
    cursor: pointer;
}

.calendar-container {
    padding: 15px;
}

.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-controls h4 {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 800;
    text-transform: capitalize;
}

.calendar-controls button {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text);
    padding: 5px 10px;
    cursor: pointer;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: #aaa;
    margin-bottom: 8px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 0.85rem;
    position: relative;
    cursor: pointer;
    transition: 0.2s;
}

.cal-day.today {
    border: 2px solid var(--secondary);
    color: var(--secondary);
    font-weight: bold;
    background: white;
}

.cal-day.has-note {
    background: var(--secondary);
    color: white;
    box-shadow: 0 3px 8px rgba(255, 71, 126, 0.4);
}

.check-in-heart {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.8));
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cal-day.has-note .check-in-heart {
    color: white;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
}

.btn-discord-pink {
    width: 100%;
    border: none;
    background: white;
    color: var(--secondary);
    font-weight: 800;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.15);
}

.btn-discord-pink:active {
    transform: scale(0.98);
    background: var(--bg);
}

.dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 0 15px;
    height: 65px;
    border-radius: 35px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(255, 71, 126, 0.25);
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dock-icon {
    font-size: 1.3rem;
    color: #ffb3c6;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: 0.4s;
    cursor: pointer;
}

.dock-icon.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-20px) scale(1.15);
    box-shadow: 0 8px 20px rgba(255, 71, 126, 0.5);
    border: 3px solid var(--bg);
}

.slot-machine-box {
    background: white;
    border: 6px solid #ffb3c6;
    border-radius: 40px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(255, 71, 126, 0.2);
    position: relative;
    margin-bottom: 20px;
}

.machine-roof {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--secondary);
    padding: 10px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(255, 71, 126, 0.4);
}

.dot {
    width: 10px;
    height: 10px;
    background: #FFD600;
    border-radius: 50%;
    animation: blink 1s infinite alternate;
}

.slot-display-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.slot-column {
    flex: 1;
    background: var(--bg);
    padding: 10px;
    border-radius: 15px;
    border: 2px solid #ffb3c6;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slot-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    text-align: center;
}

.slot-window {
    width: 100%;
    height: 80px;
    background: white;
    border: 2px solid var(--secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.reel-text {
    font-weight: 800;
    color: var(--text);
    font-size: 0.95rem;
    text-align: center;
    padding: 5px;
    line-height: 1.2;
}

.spin-btn {
    background: linear-gradient(to bottom, #ff99ac, #ff477e);
    color: white;
    border: none;
    padding: 15px 0;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 71, 126, 0.4);
    width: 100%;
    transition: 0.3s;
}

.spin-btn:active {
    transform: translateY(5px);
    box-shadow: none;
}

.spin-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.combo-card {
    background: white;
    border-radius: 25px;
    padding: 20px;
    border: 3px solid #ffb3c6;
    box-shadow: 0 10px 30px rgba(255, 71, 126, 0.2);
}

.combo-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    background: var(--bg);
    padding: 12px;
    border-radius: 15px;
    gap: 12px;
    border: 1px dashed #ffb3c6;
}

.combo-icon {
    font-size: 1.8rem;
    background: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#pet-container {
    position: fixed;
    bottom: 100px;
    left: calc(100vw - 100px);
    z-index: 1000;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: left 3s ease-in-out, bottom 3s ease-in-out;
}

#pet-img-chibi {
    width: 75px;
    height: 75px;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(255, 71, 126, 0.3));
    transition: transform 0.3s;
}

.pet-jump {
    animation: petJump 0.5s ease;
}

@keyframes petJump {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-40px);
    }
}

.pet-chat-bubble {
    background: white;
    color: var(--secondary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(255, 71, 126, 0.2);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.3s;
    pointer-events: none;
    white-space: nowrap;
    position: relative;
    border: 2px solid #ffb3c6;
}

.pet-chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.pet-chat-bubble::before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #ffb3c6 transparent transparent transparent;
    z-index: -1;
}

#custom-modal,
#modal-letters,
#modal-store {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    padding: 20px;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 300px;
    padding: 22px;
    border-radius: 28px;
    text-align: center;
    animation: popIn 0.3s;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ff99ac;
    border-radius: 15px;
    margin: 15px 0;
    outline: none;
    background: var(--bg);
    resize: vertical;
    min-height: 120px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.btn {
    padding: 10px 25px;
    border-radius: 20px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.btn-confirm {
    background: var(--secondary);
    color: white;
}

.btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.admin-only {
    display: none !important;
}

body.is-admin .admin-only {
    display: block !important;
}

.admin-box {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg);
    border-radius: 15px;
    border: 2px dashed var(--secondary);
    text-align: left;
}

.admin-box h4 {
    margin-bottom: 10px;
    color: var(--secondary);
    font-weight: 800;
    font-size: 0.9rem;
}

.admin-box select,
.admin-box textarea {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    outline: none;
}

.admin-box textarea {
    resize: vertical;
}

.letter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.envelope-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(255, 71, 126, 0.1);
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.envelope-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.env-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.env-date {
    font-size: 0.75rem;
    color: #999;
    font-weight: bold;
}

.env-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-del-letter {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    background: var(--secondary);
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.btn-del-letter:hover {
    background: var(--text);
    transform: scale(1.1);
}

.voucher-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.voucher-card {
    background: white;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(255, 71, 126, 0.1);
    transition: 0.3s;
    border: 1px solid #ff99ac;
}

.voucher-card::before,
.voucher-card::after {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.voucher-card::before {
    left: -12px;
}

.voucher-card::after {
    right: -12px;
}

.voucher-left {
    padding: 15px 15px 15px 25px;
    flex: 1;
    text-align: left;
    border-right: 2px dashed #eee;
}

.voucher-title {
    font-weight: 800;
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 5px;
}

.voucher-desc {
    font-size: 0.75rem;
    color: #888;
}

.voucher-right {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.voucher-count {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
}

.voucher-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 5px;
}

.btn-use-voucher {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.btn-use-voucher:active {
    transform: scale(0.95);
}

.voucher-card.out-of-stock {
    opacity: 0.6;
    filter: grayscale(1);
}

.voucher-card.out-of-stock .btn-use-voucher {
    background: #ccc;
    cursor: not-allowed;
}

.gacha-banner {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    position: relative;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 15px 35px rgba(255, 71, 126, 0.3);
    border: 4px solid white;
    text-align: center;
    overflow: hidden;
}

.gacha-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(100, 58, 74, 0.6), transparent);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
    margin-top: 0;
    transform: translateY(10px);
}

.banner-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8rem;
    font-weight: 700;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    margin: 0;
    color: #fff;
    letter-spacing: 1px;
}

.banner-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 5px;
    text-transform: uppercase;
}

.currency-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 8px 20px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: var(--secondary);
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.gacha-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-gacha {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid white;
    padding: 15px;
    border-radius: 20px;
    font-weight: 800;
    color: var(--text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
    box-shadow: 0 8px 20px rgba(255, 71, 126, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-gacha:active {
    transform: scale(0.95);
}

.btn-gacha span {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 5px;
    font-weight: bold;
}

.btn-gacha.x10 {
    background: linear-gradient(135deg, var(--secondary) 0%, #e63965 100%);
    border: none;
    color: white;
    box-shadow: 0 10px 25px rgba(255, 71, 126, 0.4);
}

.btn-gacha.x10 span {
    color: #fff;
    opacity: 0.9;
}

.btn-gacha i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.btn-gacha:not(.x10) i {
    color: var(--secondary);
}

.btn-gacha.x10 i {
    color: white;
}

.gacha-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.5);
    padding: 5px;
    border-radius: 16px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    background: transparent;
    color: #888;
    transition: 0.3s;
}

.tab-btn.active {
    background: white;
    color: var(--secondary);
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.15);
}

.gacha-list-container {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.history-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px dashed rgba(255, 71, 126, 0.3);
    font-size: 0.85rem;
    color: #555;
    transition: 0.2s;
}

.history-row:hover {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.history-row.r5 {
    color: #d4af37;
    font-weight: bold;
}

.history-row.r4 {
    color: #9c27b0;
}

.history-row.r2 {
    color: #aaa;
    font-style: italic;
    font-size: 0.8rem;
}

.bag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bag-item {
    background: white;
    border-radius: 16px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.1);
    position: relative;
    border: 1px solid var(--bg);
}

.bag-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.bag-name {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bag-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--secondary);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#gacha-animation {
    position: fixed;
    inset: 0;
    background: rgba(100, 58, 74, 0.95);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    backdrop-filter: blur(10px);
}

#spinning-layer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.heart-spinner {
    font-size: 80px;
    animation: heartPulse 0.8s infinite alternate;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    transition: color 0.5s ease, filter 0.5s ease;
}

.heart-spinner.white {
    color: #fff;
    filter: drop-shadow(0 0 15px #fff);
}

.heart-spinner.blue {
    color: #4fc3f7;
    filter: drop-shadow(0 0 25px #4fc3f7);
}

.heart-spinner.purple {
    color: #ab47bc;
    filter: drop-shadow(0 0 30px #ab47bc);
}

.heart-spinner.gold {
    color: #ffca28;
    filter: drop-shadow(0 0 40px #ffca28);
    animation: heartPulse 0.4s infinite alternate;
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

#result-layer {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-height: 90vh;
}

.result-scroll-container {
    width: 100%;
    max-width: 450px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.result-scroll-container::-webkit-scrollbar {
    display: none;
}

.result-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding-bottom: 20px;
    transition: all 0.3s ease;
}

.result-grid.compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-content: start;
}

.gacha-card {
    width: calc(50% - 6px);
    max-width: 180px;
    height: 160px;
    border-radius: 20px;
    padding: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: cardBurst 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.g-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
    transition: 0.3s;
}

.g-name {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    word-break: break-word;
    transition: 0.3s;
}

.result-grid.compact .gacha-card {
    width: 100%;
    max-width: none;
    height: 90px;
    padding: 10px;
    border-radius: 15px;
    flex-direction: row;
    gap: 12px;
    text-align: left;
}

.result-grid.compact .g-icon {
    font-size: 2rem;
    margin-bottom: 0;
}

.result-grid.compact .g-name {
    font-size: 0.85rem;
    text-align: left;
}

.gacha-card.r2 {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.gacha-card.r2 .g-name {
    color: #6c757d;
    font-weight: 600;
}

.gacha-card.r3 {
    background: #e3f2fd;
    border: 2px solid #90caf9;
}

.gacha-card.r3 .g-name {
    color: #1565c0;
}

.gacha-card.r4 {
    background: #f3e5f5;
    border: 2px solid #ce93d8;
    box-shadow: 0 0 15px rgba(206, 147, 216, 0.5);
}

.gacha-card.r4 .g-name {
    color: #7b1fa2;
}

.gacha-card.r5 {
    background: #fffde7;
    border: 2px solid #ffd700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
    transform: scale(1);
    z-index: 5;
}

.gacha-card.r5 .g-name {
    color: #fbc02d;
    text-shadow: 0 0 1px #ffeb3b;
}

.btn-claim {
    margin-top: 20px;
    padding: 15px 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 900;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 71, 126, 0.5);
    opacity: 0;
    animation: fadeIn 0.5s 1s forwards;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
}

@keyframes cardBurst {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

#modal-read-letter {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.envelope-wrapper {
    position: relative;
    width: 300px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease;
}

.envelope-wrapper:has(.open) {
    transform: translateY(80px);
}

.envelope {
    position: relative;
    width: 300px;
    height: 180px;
    background: #ff99ac;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.lid {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-right: 150px solid transparent;
    border-bottom: 100px solid transparent;
    border-left: 150px solid transparent;
    transform-origin: top;
    transition: transform 0.5s ease;
    z-index: 30;
}

.lid.one {
    border-top: 100px solid #ffb3c6;
    transform: rotateX(0deg);
}

.envelope.open .lid.one {
    transform: rotateX(180deg);
    z-index: 10;
    transition-delay: 0s;
}

.pocket {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-top: 100px solid transparent;
    border-right: 150px solid #ff477e;
    border-bottom: 80px solid #ff477e;
    border-left: 150px solid #ff477e;
    border-radius: 0 0 10px 10px;
    z-index: 20;
    pointer-events: none;
}

.letter-sheet {
    position: absolute;
    bottom: 0;
    left: 5%;
    width: 90%;
    height: 160px;
    background: #fffdf0;
    background-image: linear-gradient(#eee 1px, transparent 1px);
    background-size: 100% 25px;
    z-index: 15;
    transition: all 0.6s ease-in-out;
    padding: 20px;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.envelope.open .letter-sheet {
    bottom: 0;
    height: 300px;
    transform: translateY(-50px);
    z-index: 40;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition-delay: 0.4s;
    overflow-y: auto;
}

.typing-title {
    font-family: 'Dancing Script', cursive;
    color: var(--secondary);
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 10px;
    min-height: 30px;
    font-weight: bold;
}

.typing-body {
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: #444;
    line-height: 25px;
    white-space: pre-wrap;
}

.typing-footer {
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 15px;
    opacity: 0;
    transition: 1s;
}

.typing-footer.show {
    opacity: 1;
}

.stamp-decoration {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--secondary);
    font-size: 2rem;
    opacity: 0.8;
    transform: rotate(15deg);
    border: 2px solid var(--primary);
    padding: 2px 5px;
    border-radius: 4px;
}

.btn-close-letter-fixed {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: #555;
}

.couple-draw-box {
    padding: 20px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: 0.3s;
}

.couple-draw-box.fullscreen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    padding: 20px;
}

.couple-draw-box.fullscreen #coupleCanvas {
    flex: 1;
    height: auto;
}

.draw-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 16px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}

.btn-mint-soft {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(255, 71, 126, 0.2);
}

.btn-mint-soft:active {
    transform: scale(0.95);
}

#coupleCanvas {
    width: 100%;
    height: 320px;
    background: white;
    border-radius: 16px;
    touch-action: none;
    cursor: crosshair;
    border: 2px dashed var(--primary);
}

.couple-chat-box {
    display: flex;
    flex-direction: column;
    height: 400px;
    padding: 20px;
    margin-top: 20px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    padding-right: 5px;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 18px;
    font-size: 0.95rem;
    word-break: break-word;
    animation: popIn 0.3s ease;
    line-height: 1.4;
}

.chat-msg.me {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--secondary), #e63965);
    color: white;
    border-radius: 20px 20px 4px 20px;
    box-shadow: 0 5px 15px rgba(255, 71, 126, 0.3);
}

.chat-msg.partner {
    align-self: flex-start;
    background: white;
    color: var(--text);
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.chat-input-area {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
    background: white;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

.chat-input-area button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.2s;
    box-shadow: 0 5px 15px rgba(255, 71, 126, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-area button:active {
    transform: scale(0.9);
}

@media (min-width: 1024px) {
    body {
        overflow-y: auto;
        background-color: var(--bg);
        background-image: none;
    }
    #lock-screen {
        z-index: 99999;
    }
    #app {
        display: none;
        max-width: 1000px;
        width: 100%;
        height: auto;
        min-height: 100vh;
        margin: 0 auto;
        padding: 40px 40px 40px 120px;
        background: transparent;
        overflow: visible;
    }
    .greeting {
        font-size: 2.8rem;
        margin-bottom: 40px;
        text-align: center;
        text-shadow: 2px 2px 0px white;
        width: 100%;
        padding-left: 0;
    }
    .status-bar {
        display: none;
    }
    .dock {
        width: 80px;
        height: auto;
        flex-direction: column;
        top: 100px;
        left: calc(50% - 580px);
        bottom: auto;
        transform: none;
        padding: 30px 0;
        gap: 40px;
        border-radius: 40px;
        background: white;
        box-shadow: 5px 10px 20px rgba(255, 71, 126, 0.1);
        position: fixed;
    }
    #tab-home.active-section {
        display: grid;
        grid-template-columns: 2fr 1.2fr;
        grid-template-rows: auto auto auto;
        gap: 25px;
    }
    .album-container {
        grid-column: 1 / 2;
        grid-row: 1 / 4;
    }
    .weather-box {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        height: 100%;
        background: white;
    }
    .photo-slider {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        height: auto;
        overflow: visible;
        padding: 0;
    }
    .slide-item {
        min-width: auto;
        width: 100%;
        height: 180px;
        border-radius: 15px;
    }
    .card:has(.timeline-mini) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        height: 100%;
    }
    .timeline-mini {
        max-height: 400px;
    }
    #tab-vip.active-section {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        grid-template-rows: auto auto auto 1fr;
        gap: 20px 30px;
        align-items: start;
    }
    #tab-vip.active-section>div:first-child {
        grid-column: 1 / -1;
        text-align: left !important;
        margin-bottom: 10px;
        padding-left: 0;
    }
    .vip-card-container {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        margin-bottom: 0;
    }
    #tab-vip.active-section>button.btn-discord-pink {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        margin-top: 0;
    }
    .calendar-container {
        grid-column: 2 / 3;
        grid-row: 2 / 5;
        height: 100%;
        background: white;
    }
    #tab-gacha.active-section {
        display: grid;
        grid-template-columns: 1.1fr 1fr;
        grid-auto-rows: max-content;
        gap: 15px 30px;
        align-content: start;
    }
    #tab-gacha.active-section>div:first-child {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: left !important;
        padding-left: 0;
        margin-bottom: 5px;
    }
    #tab-gacha.active-section>.gacha-banner {
        grid-column: 1 / 2;
        grid-row: 2 / 4;
        height: 220px;
        margin-bottom: 0;
    }
    #tab-gacha.active-section>.gacha-btn-group {
        grid-column: 1 / 2;
        grid-row: 4;
        margin-top: 0;
    }
    #tab-gacha.active-section>button[onclick="dailyCheckIn()"] {
        grid-column: 1 / 2;
        grid-row: 5;
        margin-top: 0 !important;
        padding: 15px;
    }
    #tab-gacha.active-section>div:nth-of-type(6) {
        grid-column: 1 / 2;
        grid-row: 6;
        text-align: center !important;
        margin-top: 0 !important;
        font-size: 0.95rem;
        font-weight: bold;
    }
    #tab-gacha.active-section>.gacha-tabs {
        grid-column: 2 / 3;
        grid-row: 2;
        margin-top: 0 !important;
        margin-bottom: 0;
        background: white;
        align-self: start;
    }
    #tab-gacha.active-section>.gacha-list-container {
        grid-column: 2 / 3;
        grid-row: 3 / 7;
        height: auto !important;
        min-height: 150px;
        max-height: 400px;
        margin-top: 0;
        align-self: start;
    }
    #tab-gacha.active-section>.admin-box {
        grid-column: 1 / -1;
        grid-row: 7;
    }
    #tab-couple.active-section {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 30px;
        align-items: stretch;
        height: calc(100vh - 120px);
    }
    #tab-couple.active-section>div:first-child {
        grid-column: 1 / -1;
        text-align: left !important;
        margin-bottom: 0;
    }
    .couple-draw-box {
        grid-column: 1 / 2;
        height: 100%;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }
    #coupleCanvas {
        flex: 1;
    }
    .couple-chat-box {
        grid-column: 2 / 3;
        height: 100%;
        margin-top: 0;
    }
    #tab-date.active-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .slot-machine-box {
        width: 100%;
        max-width: 600px;
    }
    #random-result-card {
        width: 100%;
        max-width: 600px;
    }
}

.love-heart-counter {
    max-width: 550px;
    margin: 10px auto 30px auto;
    background: linear-gradient(135deg, rgba(255, 228, 230, 0.9), rgba(254, 205, 211, 0.9));
    backdrop-filter: blur(12px);
    border: 2px solid #FFB6C1;
    padding: 18px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 12px 30px rgba(244, 63, 94, 0.25);
    animation: floatBox 4s ease-in-out infinite;
}

.love-counter-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 182, 193, 0.7);
    border-radius: 24px;
    padding: 18px 20px;
    margin: 0 auto 20px auto;
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
    text-align: center;
}

.counter-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 5px;
    position: relative;
}

.avatar-box-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #ff477e, #ff758c);
    box-shadow: 0 4px 12px rgba(255, 71, 126, 0.3);
    z-index: 2;
}

.love-avatar-square {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.orbit-container {
    flex: 1;
    position: relative;
    height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
}

.heart-orbit-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.comet-heart {
    position: absolute;
    font-size: 1rem;
    filter: drop-shadow(0 0 6px #ff477e);
    animation: cometFly 2.5s ease-in-out infinite;
}

@keyframes cometFly {
    0% {
        transform: translate(-45px, 10px) scale(0.7);
        opacity: 0.3;
    }
    50% {
        transform: translate(0px, -15px) scale(1.3);
        opacity: 1;
    }
    100% {
        transform: translate(45px, 10px) scale(0.7);
        opacity: 0.3;
    }
}

.orbit-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #db2777;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 15px;
    z-index: 1;
}

.counter-digits-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.digit-box {
    background: #fff0f3;
    border: 1px solid #ffd1dc;
    border-radius: 12px;
    padding: 6px 8px;
    min-width: 50px;
    box-shadow: inset 0 2px 4px rgba(255, 192, 203, 0.3);
}

.digit-box .num {
    display: block;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #e11d48;
    line-height: 1.1;
}

.digit-box .lbl {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    color: #9f1239;
    text-transform: uppercase;
    margin-top: 2px;
}

.colon {
    font-family: 'Baloo 2', cursive, sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #f43f5e;
    margin-top: -12px;
}

.presence-user {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.presence-avatar {
    width: 44px;
    height: 44px;
    position: relative;
    flex-shrink: 0;
}

.presence-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ffb3c6;
    display: block;
}

.presence-dot {
    width: 12px;
    height: 12px;
    position: absolute;
    right: -1px;
    bottom: 0;
    border-radius: 50%;
    background: #bdbdbd;
    border: 2px solid white;
    transition: all 0.3s ease;
}

.presence-dot.online {
    background: #42d77d;
    box-shadow: 0 0 0 4px rgba(66, 215, 125, 0.14), 0 0 10px rgba(66, 215, 125, 0.5);
    animation: presencePulse 2s infinite;
}

@keyframes presencePulse {
    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(66, 215, 125, 0.12), 0 0 10px rgba(66, 215, 125, 0.4);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(66, 215, 125, 0.04), 0 0 16px rgba(66, 215, 125, 0.6);
    }
}


/* TRẢ LẠI GIAO DIỆN Ô TRẠNG THÁI GỐC CỰC GỌN GÀNG */

.presence-card {
    margin: 10px 15px 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 71, 126, 0.08);
    border-radius: 20px;
    box-shadow: 0 6px 20px rgba(255, 71, 126, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 2;
}


/* Ẩn các class liên quan đến 3 nút cũ (để chắc chắn chúng không bao giờ hiện ra làm phiền nữa) */

.presence-users-wrapper,
.love-actions {
    display: none !important;
}

.presence-info {
    min-width: 0;
}

.presence-name {
    font-size: 0.82rem;
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.presence-status {
    font-size: 0.67rem;
    color: #999;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: 0.3s;
}

.presence-status.online-text {
    color: #34b96b;
    font-weight: 800;
}

.presence-divider {
    width: 1px;
    height: 32px;
    background: #f0ccd6;
    flex-shrink: 0;
}

.both-online-badge {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 15px 12px;
    padding: 7px 12px;
    border-radius: 50px;
    background: linear-gradient( 135deg, rgba(255, 71, 126, 0.10), rgba(255, 182, 193, 0.18));
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 900;
    animation: bothOnlineAppear 0.4s ease-out;
}

.both-online-badge.show {
    display: flex;
}

.both-online-heart {
    animation: heartBeatGlow 1.2s infinite;
}

@keyframes bothOnlineAppear {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.role-selector {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 240, 245, 0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.role-selector.show {
    display: flex;
    animation: roleFadeIn 0.35s ease-out;
}

@keyframes roleFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.role-box {
    width: 100%;
    max-width: 370px;
    padding: 28px 20px 20px;
    text-align: center;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 60px rgba(255, 71, 126, 0.20);
}

.role-heart {
    font-size: 45px;
    margin-bottom: 8px;
    animation: heartBeatGlow 1.5s infinite;
}

.role-box h2 {
    color: var(--secondary);
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 7px;
}

.role-box p {
    color: #98727d;
    font-size: 0.78rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.role-buttons {
    display: flex;
    gap: 12px;
}

.role-btn {
    flex: 1;
    border: none;
    padding: 13px 8px;
    border-radius: 20px;
    background: #fff5f8;
    border: 2px solid #ffd5df;
    cursor: pointer;
    transition: 0.25s;
    color: var(--text);
}

.role-btn:hover {
    transform: translateY(-4px);
    border-color: var(--secondary);
    box-shadow: 0 10px 25px rgba(255, 71, 126, 0.16);
}

.role-btn:active {
    transform: scale(0.96);
}

.role-btn img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto 9px;
    border: 3px solid #ffb3c6;
}

.role-btn-name {
    display: block;
    font-weight: 900;
    font-size: 0.9rem;
}

.role-btn-desc {
    display: block;
    margin-top: 3px;
    color: #a27c87;
    font-size: 0.7rem;
}

.role-warning {
    margin-top: 18px;
    color: #b99aa4;
    font-size: 0.65rem;
}

@media (max-width: 380px) {
    .presence-card {
        padding: 10px;
    }
    .presence-avatar {
        width: 38px;
        height: 38px;
    }
    .presence-name {
        font-size: 0.75rem;
    }
    .presence-status {
        font-size: 0.61rem;
    }
    .presence-divider {
        height: 28px;
    }
}


/* === LIVE LOVE FEATURES (TƯƠNG TÁC TRỰC TIẾP) === */

.love-action-btn {
    flex: 1;
    max-width: 110px;
    border: 0;
    border-radius: 16px;
    padding: 8px 5px;
    background: #fff5f8;
    border: 1px solid #ffd5df;
    box-shadow: 0 4px 10px rgba(255, 71, 126, 0.05);
    cursor: pointer;
    transition: 0.2s;
}

.love-action-btn:hover {
    transform: translateY(-3px);
}

.love-action-btn:active {
    transform: scale(0.94);
}

.love-action-btn span {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

.love-action-btn small {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text);
}

.love-action-toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 35px rgba(255, 71, 126, 0.18);
    color: var(--secondary);
    font-size: 13px;
    font-weight: 900;
    transition: 0.3s;
}

.love-action-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.miss-you-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    pointer-events: none;
    z-index: 100000;
    padding: 25px 35px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 70px rgba(255, 71, 126, 0.25);
    text-align: center;
    color: var(--secondary);
    font-weight: 900;
    transition: 0.35s;
}

.miss-you-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.miss-you-heart {
    font-size: 55px;
    margin-bottom: 10px;
    animation: missYouBeat 1s infinite;
    filter: drop-shadow(0 0 10px rgba(255, 71, 126, 0.3));
}

@keyframes missYouBeat {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.lover-arrival {
    position: fixed;
    left: 50%;
    top: 20%;
    transform: translate(-50%, -30px) scale(0.8);
    opacity: 0;
    pointer-events: none;
    z-index: 100001;
    width: min(330px, calc(100vw - 40px));
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    box-shadow: 0 20px 70px rgba(255, 71, 126, 0.25);
    transition: 0.4s;
}

.lover-arrival.show {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.arrival-hearts {
    font-size: 28px;
    margin-bottom: 8px;
    animation: arrivalHeart 1s infinite;
}

#arrival-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--secondary);
}

#arrival-message {
    margin-top: 5px;
    font-size: 13px;
    color: #a37c87;
    font-weight: bold;
}

@keyframes arrivalHeart {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}

.pet-call-popup {
    position: fixed;
    left: 50%;
    bottom: 120px;
    transform: translate(-50%, 30px) scale(0.8);
    opacity: 0;
    pointer-events: none;
    z-index: 100002;
    padding: 18px 25px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 15px 50px rgba(255, 71, 126, 0.2);
    text-align: center;
    transition: 0.35s;
}

.pet-call-popup.show {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.pet-call-icon {
    font-size: 45px;
    animation: petBounce 0.7s infinite;
}

#pet-call-text {
    margin-top: 6px;
    font-weight: 900;
    color: var(--secondary);
    font-size: 15px;
}

@keyframes petBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.shared-music {
    margin: 0 15px 25px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 25px rgba(255, 71, 126, 0.08);
    border: 1px solid rgba(255, 182, 193, 0.3);
}

.shared-music-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--secondary);
    margin-bottom: 12px;
}

.shared-music input {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    outline: 0;
    padding: 12px 15px;
    border-radius: 14px;
    background: #fff3f6;
    font-family: inherit;
}

.shared-music button {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 71, 126, 0.2);
}

body.both-love-online::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at 20% 20%, rgba(255, 120, 160, 0.12), transparent 40%), radial-gradient(circle at 80% 80%, rgba(255, 180, 200, 0.12), transparent 40%);
    animation: loveBreath 4s ease-in-out infinite;
}

@keyframes loveBreath {
    0%,
    100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}