/* Import Google Fonts for a clean, spiritual feel */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap');

.top-title {
	font-size: 1.9rem;
	font-weight: 700;
	margin-bottom: 14px;
	text-align: center;

	/* Gradient text */
	background: linear-gradient(90deg, #ff9800, #ff5722, #ff9800);
	background-size: 200% auto;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;

	/* Animation */
	animation: gradientMove 3s linear infinite, glowPulse 2s ease-in-out infinite;
}

@keyframes gradientMove {
	to {
		background-position: 200% center;
	}
}

@keyframes glowPulse {
	0% {
		text-shadow: 0 0 6px rgba(255, 152, 0, 0.6);
	}
	50% {
		text-shadow: 0 0 16px rgba(255, 87, 34, 0.9);
	}
	100% {
		text-shadow: 0 0 6px rgba(255, 152, 0, 0.6);
	}
}

.top-table {
	width: 100%;
	border-collapse: collapse;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.top-table thead {
	background: linear-gradient(90deg, #ff9800, #ff5722);
	color: white;
}

.top-table th,
.top-table td {
	padding: 12px 16px;
	text-align: center;
}

.top-table tbody tr {
	background: #fff;
	animation: slideUp 0.8s ease forwards;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.top-table tbody tr:hover {
	transform: translateY(-4px) scale(1.01);
	box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Rank highlighting */
.rank-1 {
	background: linear-gradient(90deg, #fff7e6, #ffe0b2);
	font-weight: bold;
}

.rank-2 {
	background: linear-gradient(90deg, #f5f5f5, #eeeeee);
	font-weight: bold;
}

.rank-3 {
	background: linear-gradient(90deg, #fbe9e7, #ffccbc);
	font-weight: bold;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin-top: 16px;
}

.day-card {
	background: #f9f9ff;
	border-radius: 10px;
	padding: 12px;
	text-align: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.day-card .date {
	font-size: 14px;
	color: #666;
	margin-bottom: 6px;
}

.day-card .count {
	font-size: 20px;
	font-weight: bold;
	color: #4b3cff;
}

.grand-total {
	margin-top: 20px;
	font-size: 22px;
	color: #2e7d32;
	text-align: center;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    /* Soft blue to lavender gradient */
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
}

.container {
    max-width: 600px;
    width: 90%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin: 20px;
    text-align: center;
}

h1 {
    color: #1976d2;
    /* Deep blue for headings */
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 2em;
}

h2 {
    color: #1976d2;
    font-weight: 600;
    margin-top: 30px;
}

#grandTotal {
    margin-top: 15px;
    font-size: 1.2rem;
    color: 1976d2;
}

.total-row {
    color: rgb(156, 0, 0);
    font-weight: bold;
}


p {
    color: #666;
    line-height: 1.6;
}

.quote {
    color: #b70034;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

input,
select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    border-color: #1976d2;
    outline: none;
}

button {
    padding: 12px;
    background: linear-gradient(45deg, #1976d2, #42a5f5);
    /* Blue gradient */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

a:hover {
    color: #0d47a1;
}

#totals {
    margin-top: 20px;
}

#totals p {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin: 5px 0;
    border-left: 4px solid #1976d2;
}

#author {
    text-align: right;
    font-size: 18px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }
}

/* ---------- User Submission Table ---------- */
table {
    width: 100%;
    margin-top: 25px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

thead {
    background: linear-gradient(45deg, #1976d2, #42a5f5);
    color: white;
}

thead th {
    padding: 14px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
}

tbody tr {
    transition: background 0.3s, transform 0.2s;
}

tbody td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

tbody tr:nth-child(even) {
    background: #f7faff;
}

tbody tr:hover {
    background: #e3f2fd;
    transform: scale(1.01);
}

/* ---------- Highlight Logged-in User ---------- */
tr.highlight-user {
    background: linear-gradient(90deg, #e8f5e9, #e3f2fd) !important;
    font-weight: 600;
    border-left: 6px solid #43a047;
}

/* Smooth highlight fade */
tr.highlight-user {
    animation: glow 1.5s ease-in-out;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 rgba(67, 160, 71, 0);
    }

    50% {
        box-shadow: 0 0 15px rgba(67, 160, 71, 0.4);
    }

    100% {
        box-shadow: 0 0 0 rgba(67, 160, 71, 0);
    }
}

/* Header with logout */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Logout button */
.logout-form {
    margin-left: auto;
    margin-right: 0;
}

.logout-btn {
    padding: 8px 14px;
    font-size: 14px;
    background: linear-gradient(45deg, #d32f2f, #f44336);
    border-radius: 6px;
}

.logout-btn:hover {
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.35);
    transform: translateY(-1px);
}

/* Search bar above user table */
.table-search {
    width: 95%;
    padding: 10px 12px;
    display: block;
    margin: 0 auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.table-search:focus {
    border-color: #1976d2;
    outline: none;
}