/* -----------------------
   Global & Reset
------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Comic Sans MS', 'Comic Neue', sans-serif;
}

body {
    background: linear-gradient(to right, #ffecd2, #fcb69f);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Splash Screen */
#splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,#2372aa,#22739f);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease forwards;
    animation-delay: 4s;
}

.splash-content {
    text-align: center;
    color: white;
    animation: zoomIn 1.2s ease;
}

.logo {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.tagline {
    font-size: 2rem;
    opacity: 0.9;
}

/* Animations */

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.container {
    position: relative;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-width: 1000px;
    width: 100%;
}

/* -----------------------
   Headings
------------------------- */
h2 {
    text-transform: uppercase;
    margin-bottom: 25px;
}

h2, h3 {
    color: #ff6f61;
    margin-bottom: 20px;
    line-height: 1.3;
    font-size:30px;
}

h4 {
    color: #ff6f61;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* -----------------------
   Sections
------------------------- */
section {
    padding: 20px 0;
    margin-bottom: 35px;
    border-bottom: 3px solid #ff6f61;
    scroll-margin-top: 80px;
}

section:last-of-type {
    border-bottom: none;
}

/* Tabs */

.tab-buttons{
display:flex;
flex-wrap:wrap;
gap:10px;
margin-bottom:20px;
}

.tab-btn{
background:#eee;
border:none;
padding:10px 16px;
border-radius:8px;
cursor:pointer;
font-weight:bold;
}

.tab-btn:hover{
background:#ff9980;
color:white;
}

.tab-btn.active{
background:#ff6f61;
color:white;
}

.tab-content{
display:none;
animation:fadeIn .25s ease;
}

@keyframes fadeIn{
from{opacity:0}
to{opacity:1}
}

/* -----------------------
   Forms
------------------------- */
input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 10px;
    border: 2px solid #ff6f61;
    font-size: 16px;
    line-height: 1.4;
}

input[type="submit"], .btn {
    background-color: #ff6f61;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px 0;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

input[type="submit"]:hover, .btn:hover {
    background-color: #ff9980;
}

/* Undo/Delete button */
.btn.undo {
    background-color: #aaa;
}
.btn.undo:hover {
    background-color: #999;
}

/* Optional: add a slightly different color for reset buttons */
.btn.reset {
    background-color: #ffcccb;
    color: #333;
}
.btn.reset:hover {
    background-color: #ffb3b0;
}

/* -----------------------
   Tables
------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    margin-bottom: 20px;
    table-layout: auto;
    line-height: 1.5;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #ccc;
    text-align: left;
    word-wrap: break-word;
    vertical-align: middle;
}

/* Alternate row colors for readability */
tbody tr:nth-child(even) {
    background-color: #fff8f5;
}

/* Responsive table labels */
@media (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #eee;
    }

    th {
        display: none;
    }

    td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
    }

    td .btn {
        margin-top: 5px;
        font-size: 14px;
        padding: 6px 10px;
    }
}

.progress-text{
font-size:20px;
}

/* -----------------------
   Messages
------------------------- */
.messages {
    list-style: none;
    margin-bottom: 20px;
}

.message-item {
    background-color: #fff3cd;
    border-left: 6px solid #ff6f61;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Spacer helper */
.spacer {
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* -----------------------
   Header Bar (Top Right Buttons)
------------------------- */
@media (max-width: 600px) {
  .header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.btn[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
}

.floating-logout {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.floating-logout:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .floating-logout {
        top: 20px;
        right: 20px;
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* -----------------------
   Admin Table of Contents
------------------------- */
.admin-toc {
    position: sticky;       /* Make nav stick to top */
    top: 0;                 /* Distance from top of viewport */
    z-index: 999;           /* Stay above other content */
    background-color: #fff8f5;
    border: 2px solid #ff6f61;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* subtle shadow for depth */
}

.admin-toc h3 {
    margin-bottom: 15px;
}

.toc-links {
    display: flex;
    flex-wrap: wrap;        /* Wrap links on smaller screens */
    gap: 12px;
    justify-content: center; /* Center links on mobile */
}

.toc-links a {
    background-color: #ff6f61;
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s ease;
}

.toc-links a:hover {
    background-color: #ff9980;
}

/* Optional: Make sure sticky works well on mobile with some extra padding */
@media (max-width: 768px) {
    .admin-toc {
        padding: 15px;
    }
    .toc-links a {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* -----------------------
   Back To Top Button
------------------------- */
.back-to-top {
    display: none;
    position: fixed;
    top: 30px;
    left: 50px;
    background-color: rgb(255, 111, 97, 0.4);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 18px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #ff9980;
    transform: translateY(-3px);
}

.toggle{
display:none;
}

@keyframes bounceIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.special {
  animation: bounceIn 0.5s ease;
  border:5px solid lime;
  background:black;
}
.special:hover{
  border:5px solid transparent;
}