.countdown {
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;

    /* --- Responsive Font Sizing using VW and Clamp --- */
    /* This makes the font size scale with the viewport width, */
    /* but prevents it from becoming too small or too large. */
    /* clamp(MINIMUM_SIZE, PREFERRED_SIZE, MAXIMUM_SIZE) */
    font-size: clamp(2.5rem, 12vw, 9rem);

    /* Use flexbox to layout the 'days' and 'time' components */
    display: flex;
    flex-direction: column; /* This is the key change to stack items vertically */
    justify-content: center;
    align-items: center; /* This ensures the items are centered horizontally */
    gap: 0.25em; /* Adds a small space between 'days' and 'time' */
}

.countdown-wrapper {
    /* The parent .countdown-panel already provides padding. */
    /* Removing this margin gives the text more space to prevent wrapping too early. */
    margin: 0;
    text-align: center;
}

/* Create a common class for title and suffix styles */
.countdown-text-block {
    /* Use clamp() for responsive font size with min/max limits */
    font-family: "Poppins", sans-serif;
    color: #999;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Allow long words (like a title without spaces) to break to prevent overflow */
    overflow-wrap: break-word;
}

.countdown-title {
    font-size: clamp(1rem, 4vw, 2.2rem);
    font-weight: bold;
}

.countdown-suffix {
    margin-top: 1em;
    /* Use clamp() for responsive font size with min/max limits */
    font-size: clamp(0.8rem, 3vw, 1.2rem);
}

.countdown-timezone {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    margin-top: 1em;
    padding: 1em 4em;
}

body {
    margin: 0;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    width: 100vw;
    overflow: hidden;

    /* Center text in the window */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.countdown-container {

}

.countdown-panel {
    background-color: rgba(0, 0, 0, 0.6);
    padding: clamp(1em, 5vw, 3em);
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    max-width: 90vw; /* Prevent panel from getting too wide and give it space from edges */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    display: flex;
    flex-direction: column;
    align-items: center; /* Use align-items to center children horizontally in a column flex container */
}

.button-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1em;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    padding: 0 1.5em;
    gap: 0.5em; /* Use gap for spacing instead of &nbsp; */
    box-sizing: border-box;
    z-index: 1050; /* Sit below modals but above page content */
}

#unsplash-credit {
    margin-right: auto;
    font-weight: normal;
    font-size: clamp(0.6rem, 1.3vw, 1.0rem);

}

/* --- Collapsible Menu --- */

/* The main container for our new menu */
.collapsible-menu {
    position: relative; /* This will be the positioning context for the dropdown */
}

/* The hamburger button */
.menu-toggle-btn {
    /* Re-use icon-button styles for consistency */
    padding: clamp(0.5em, 1.2vw, 0.8em);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
}

.menu-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.menu-toggle-btn svg {
    width: clamp(1rem, 1.5vw, 1.2rem);
    height: clamp(1rem, 1.5vw, 1.2rem);
    fill: white;
}

/* The dropdown panel */
.menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5em); /* Position it below the toggle button with a small gap */
    right: 0;
    background: linear-gradient(145deg, #1a1d24, #111317);
    border: 1px solid rgba(100, 120, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 200px;
    z-index: 1100; /* Make sure it's on top */
    padding: 0.5em 0;
    /* Hidden by default */
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    transform-origin: top right;
}

/* The open state for the dropdown */
.menu-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* Links inside the dropdown */
.menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75em;
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    font-family: "Poppins", sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-dropdown a:hover {
    background-color: rgba(100, 120, 255, 0.1);
    color: #fff;
}

.menu-dropdown a svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    opacity: 0.7;
}

.attractive-button {
    /* Sizing and Text Styling */
    display: inline-block;
    font-weight: bold;
    color: white;
    text-decoration: none;
    text-align: center;
    font-family: "Poppins", sans-serif;
    border: none; /* Reset border for <button> elements */

    /* Responsive Sizing using clamp() */
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    padding: clamp(0.4em, 1vw, 0.6em) clamp(0.8em, 2vw, 1.2em);

    /* Appearance */
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.attractive-button a:link, .attractive-button a:visited, .attractive-button a:active {
    color: white;
    text-decoration: underline;
    text-align: center;
}

.attractive-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.icon-button {
    /* Adjust padding to be more circular for an icon */
    padding: clamp(0.5em, 1.2vw, 0.8em);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button svg {
    width: clamp(1rem, 1.5vw, 1.2rem);
    height: clamp(1rem, 1.5vw, 1.2rem);
    fill: white;
}

/* Make editable elements a positioning container for their labels */
.editable {
    position: relative;
}

/* Style for the labels that appear on editable elements */
.editable::after {
    content: attr(data-label);
    position: absolute;
    top: 0.3rem;
    right: 0rem;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-weight: normal;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.3em 0.8em;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none; /* So the label doesn't interfere with clicks */
    z-index: 10;
    opacity: 70%;
}

/*
 * Styles for a futuristic Timezone Selector Modal
 */
.timezone-modal .modal-content {
    background: linear-gradient(145deg, #1a1d24, #111317);
    border: 1px solid rgba(100, 120, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

.timezone-modal .modal-header {
    border-bottom: 1px solid rgba(100, 120, 255, 0.2);
}

.timezone-modal .btn-close {
    filter: invert(80%) sepia(100%) saturate(1000%) hue-rotate(200deg);
}

.timezone-modal #timezone-filter {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 120, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
}

/* Make placeholder text in futuristic modals more visible */
.timezone-modal .form-control::placeholder,
.unsplash-modal .form-control::placeholder,
.edit-modal-futuristic .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7); /* Increased opacity for better visibility */
    font-style: italic;
    opacity: 1; /* Override Firefox's default opacity */
}

.timezone-modal #timezone-filter:focus {
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-color: rgba(100, 120, 255, 0.7);
    box-shadow: 0 0 15px rgba(100, 120, 255, 0.3);
}

/* Style the footer border for all futuristic modals */
.timezone-modal .modal-footer,
.display-modal .modal-footer,
.edit-modal-futuristic .modal-footer {
    border-top: 1px solid rgba(100, 120, 255, 0.2);
}

/*
 * Styles for the promotional banner
 */
.promo-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, rgba(30, 35, 60, 0.85), rgba(50, 35, 70, 0.85));
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(102, 126, 234, 0.25);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.7rem;
    transition: transform 0.3s ease-in-out;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 1em;
    color: rgba(255, 255, 255, 0.8);
}

.promo-content a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.3em 0.8em;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.promo-content a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.close-promo-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.2s ease;
}

.close-promo-btn:hover {
    color: #fff;
}


/*
 * Styles for a futuristic Unsplash Search Modal
 */
.unsplash-modal .modal-content {
    background: linear-gradient(145deg, #1a1d24, #111317);
    border: 1px solid rgba(100, 120, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

.unsplash-modal .modal-header {
    border-bottom: 1px solid rgba(100, 120, 255, 0.2);
}

.unsplash-modal .btn-close {
    filter: invert(80%) sepia(100%) saturate(1000%) hue-rotate(200deg);
}

.unsplash-modal .form-control {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 120, 255, 0.3);
    color: #fff;
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    border-right: none; /* Part of an input group */
}

.unsplash-modal .form-control:focus {
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-color: rgba(100, 120, 255, 0.7);
    box-shadow: 0 0 15px rgba(100, 120, 255, 0.3);
    z-index: 5; /* Bring focus shadow above the button */
}

.unsplash-modal .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 1px solid rgba(100, 120, 255, 0.3);
    color: #fff;
    transition: all 0.3s ease;
}

.unsplash-modal .btn-primary:hover {
    background: linear-gradient(135deg, #768eff, #875cd3);
    box-shadow: 0 0 15px rgba(100, 120, 255, 0.3);
}

.unsplash-thumbnail:hover {
    border-color: #6478ff;
    transform: scale(1.05);
}

.timezone-list-item {
    list-style: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease, color 0.3s ease, border-left-color 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.timezone-list-item:hover {
    background-color: rgba(100, 120, 255, 0.1);
    color: #fff;
    border-left-color: #6478ff;
}

.timezone-list-item:last-child {
    border-bottom: none;
}

/*
 * Styles for a futuristic Display Selector Modal
 */
.display-modal .modal-content {
    background: linear-gradient(145deg, #1a1d24, #111317);
    border: 1px solid rgba(100, 120, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

.display-modal .modal-header {
    border-bottom: 1px solid rgba(100, 120, 255, 0.2);
}

.display-modal .btn-close {
    filter: invert(80%) sepia(100%) saturate(1000%) hue-rotate(200deg);
}

.display-modal .form-select {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 120, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    /* A custom SVG for the dropdown arrow to match the theme */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236478ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.display-modal .form-select:focus {
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-color: rgba(100, 120, 255, 0.7);
    box-shadow: 0 0 15px rgba(100, 120, 255, 0.3);
}

/*
 * Styles for a futuristic Title/Date Edit Modal
 */
.edit-modal-futuristic .modal-content {
    background: linear-gradient(145deg, #1a1d24, #111317);
    border: 1px solid rgba(100, 120, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

.edit-modal-futuristic .modal-header {
    border-bottom: 1px solid rgba(100, 120, 255, 0.2);
}

.edit-modal-futuristic .btn-close {
    filter: invert(80%) sepia(100%) saturate(1000%) hue-rotate(200deg);
}

.edit-modal-futuristic .form-control {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 120, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    color-scheme: dark; /* Helps browser pick a light-colored icon for date/time inputs */
}

.edit-modal-futuristic .form-control:focus {
    background-color: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-color: rgba(100, 120, 255, 0.7);
    box-shadow: 0 0 15px rgba(100, 120, 255, 0.3);
}

/*
 * Styles for a futuristic Feedback Modal
 */
.feedback-modal .modal-content {
    background: linear-gradient(145deg, #1a1d24, #111317);
    border: 1px solid rgba(100, 120, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

.feedback-modal .modal-header {
    border-bottom: 1px solid rgba(100, 120, 255, 0.2);
}

.feedback-modal .btn-close {
    filter: invert(80%) sepia(100%) saturate(1000%) hue-rotate(200deg);
}

.feedback-modal .modal-body {
    padding: 0; /* Remove padding to let the iframe fill the space */
    height: 70vh; /* Give the body a responsive height */
    overflow: hidden; /* Hide any potential scrollbars on the body itself */
}

.feedback-modal iframe {
    border-bottom-left-radius: 15px; /* Match the modal's border radius */
    border-bottom-right-radius: 15px;
}
