/* style.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #a18cd1 100%); /* Pink to Purple */
    color: #333;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 350px;
    text-align: center;
    border: 2px solid #d291bc;
}

h1, h2 {
    color: #8a2be2; /* BlueViolet */
}

input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 2px solid #ba55d3; /* MediumOrchid */
    border-radius: 5px;
    outline: none;
}

/* heart/input emoji grouping */
.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.input-group input { width: 80%; }

/* prettier auth-button emojis */
button { font-size: 1rem; }

button {
    background: linear-gradient(to right, #ff69b4, #ba55d3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
    width: 100%;
    margin-top: 10px;
}

button:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #ff1493, #8a2be2);
}

/* heartbeat animation for logo */
.heartbeat {
    display:inline-block;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%{transform:scale(1)}
    50%{transform:scale(1.2)}
    100%{transform:scale(1)}
}

/* button bounce on load */
button {
    animation: pop 0.6s ease-in-out both;
}
@keyframes pop {
    0%{transform:scale(0.8);opacity:0}
    60%{transform:scale(1.1);opacity:1}
    100%{transform:scale(1)}
}

/* authentication tabs styling */
.auth-tabs { display:flex; justify-content:center; gap:10px; margin-bottom:15px; }
.auth-tabs button { width:auto; padding:6px 14px; border-radius:12px; }
.auth-tabs button.active { background:#8a2be2; }
.auth-form { display:none; }
.auth-form.active { display:block; }


/* Dashboard Layout */
#dashboard-view {
    display: none; /* Hidden by default */
    width: 90%;
    height: 90vh;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from{opacity:0;transform:translateY(20px)}
    to{opacity:1;transform:translateY(0)}
}

.message {
    animation: slideIn 0.4s ease;
}
@keyframes slideIn {
    from{opacity:0;transform:translateX(-20px)}
    to{opacity:1;transform:translateX(0)}
}

/* floating hearts/ribbons */
body::before {
    content: '';
    position: fixed;
    top: -50px;
    left: 50%;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><text x="0" y="75" font-size="80" fill="red">&#10084;</text></svg>') no-repeat center;
    opacity: 0.3;
    animation: floatHeart 4s infinite ease-in-out;
    pointer-events: none;
}

@keyframes floatHeart {
    0% {transform: translate(-50%,0) rotate(0deg);}    
    50% {transform: translate(-50%,20px) rotate(10deg);}   
    100% {transform: translate(-50%,0) rotate(-10deg);}  
}

/* additional ribbon effect in dashboard header */
.navbar::after {
    content: '🎀';
    position: absolute;
    right: 10px;
    font-size: 2rem;
    animation: ribbonBounce 2s infinite alternate;
}
@keyframes ribbonBounce {
    from {transform: translateY(0);} to {transform: translateY(-5px);}    
}

.navbar {
    display: flex;
    justify-content: space-around;
    background: #8a2be2;
    padding: 15px;
    color: white;
    border-radius: 15px 15px 0 0;
}

.nav-btn {
    background: transparent;
    width: auto;
    border: 1px solid white;
}

.nav-btn.active {
    background: #ff69b4;
}

/* Game selection buttons */
.game-btn {
    background: transparent;
    border: 2px solid #8a2be2;
    color: #8a2be2;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.game-btn:hover {
    background: #8a2be2;
    color: white;
}

.game-btn.active {
    background: #8a2be2;
    color: white;
}

/* Calendar styles */
#section-calendar input, #section-calendar select, #section-calendar button, #section-calendar textarea {
    font-size: 14px;
}

#calendar-list div { background: white; }

.content-area {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    text-align: left;
}

/* Tic Tac Toe Grid */
.game-board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 5px;
    margin: 20px auto;
    width: fit-content;
}

.cell {
    width: 100px;
    height: 100px;
    background: #e0b0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: #4b0082;
    cursor: pointer;
    border-radius: 10px;
}

/* Chat UI */
#chat-container {
    display: flex;
    flex-direction: column;
    height: 300px;
    border: 2px solid #ba55d3;
    border-radius: 10px;
}

#messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f0f8ff;
}

.message { position: relative; padding-right:20px; }
.message .delete-msg { position: absolute; right:4px; top:4px; cursor:pointer; color:#a00; font-weight:bold; }
.message .delete-msg:hover { color:#e00; }

.message {
    padding: 5px 10px;
    margin: 5px 0;
    background: #e6e6fa;
    border-radius: 10px;
    align-self: flex-start;
}