/* Homepage Grid */
#exam-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); 
    gap: 1vw;
    padding: 1vw;
    background-color: #000000;
    width: 100%;
    box-sizing: border-box;
}

.exam-card {
    background-color: #1a1a1a;
    border-radius: 4px;
    aspect-ratio: 16 / 9; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    overflow: hidden; 
    min-width: 0;
	padding: 4px 2px; 
    box-sizing: border-box;
}

.exam-title {
    font-size: clamp(8px, 0.7vw + 0.5vh, 12px);
    color: #ffffff;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 95%; 
    display: block;
}

.days-left {
    font-size: calc(1.8vw + 1.8vh + 4px);
    font-weight: 700;
    line-height: 1;
    font-family: 'Ubuntu', sans-serif;
}

.days-label {
    font-size: 0.5em;
    color: #ffffff;
    margin-left: 2px;
}

.color-red { color: #ff4d4d; }
.color-orange { color: #ffa500; }
.color-green { color: #2ecc71; }
.color-blue { color: #3498db; }

/* Show More Page Grid */
#schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.schedule-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    min-width: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #aaaaaa;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}

.exam-name-static {
    font-size: 1.2rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-row {
    font-size: 0.9rem;
    color: #ffffff;
}

.countdown-row {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 5px;
}

@media (max-width: 768px) {
    #exam-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; }
    #schedule-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; }
    .exam-name-static { font-size: 1rem; }
    .countdown-row { font-size: 1.5rem; }
}

@keyframes flash-yellow {
    0%, 100% { color: #ffffff; }
    50% { color: #ffff00; }
}

.is-today {
    animation: flash-yellow 2s steps(1) infinite;
}

/* Update the grid to have exactly 2 columns */
#announcement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Forces two cards per row  */
    gap: 20px;
    padding: 20px;
}

/* Ensure the card has a dark grey background, not the line color [cite: 43, 44] */
.announcement-card {
    background-color: #1a1a1a; /* Dark grey background [cite: 25, 43] */
    border-top: 4px solid var(--line-color, #333); /* Keeps line color as a top accent  */
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    min-height: 150px; /* Adjust based on your mockup needs */
}

/* Ensure the body text is white and not inheriting line colors [cite: 13, 27] */
.announcement-card h3 {
    color: #ffffff;
    margin-top: 0;
}

/* "Show More" Button - uses line color */
.show-more {
    background: none;
    border: 1px solid var(--line-color);
    color: var(--line-color);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.show-more:hover {
    background-color: var(--line-color);
    color: var(--line-text);
}

/* Player Seek Bar */
.seek-bar {
    accent-color: var(--line-color);
}

/* Modal Title - uses line color */
#modalTitle {
    color: var(--line-color);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #2a2a2a; /* Consistent with header [cite: 47] */
    margin: 10% auto;
    padding: 30px;
    width: 80%;
    max-width: 600px;
    border-radius: 12px;
}
