@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --primary-bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    overflow: hidden;
    /* Prevent scrolling in display mode */
    height: 100vh;
    width: 100vw;
}

/* --- Input Section --- */
#input-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    background: radial-gradient(circle at top right, #1e1b4b, transparent 40%),
        radial-gradient(circle at bottom left, #312e81, transparent 40%);
    transition: opacity 0.5s ease-in-out;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="time"] {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

/* Make the clock icon white */
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

button.confirm-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--accent), #ec4899);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.5);
}

button.confirm-btn:active {
    transform: scale(0.98);
}

/* --- Display Section --- */
#display-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Animated Gradient Background */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    padding: 2rem;
    opacity: 0;
    /* For fade in transition */
    transition: opacity 0.8s ease-in-out;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.content-wrapper {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    padding: 4rem 6rem;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
}

#display-activity {
    font-size: 8vw;
    /* Very large responsive text */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

#display-return-time {
    font-size: 3vw;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

#display-countdown {
    font-size: 5vw;
    font-family: 'Courier New', monospace;
    /* Monospace for steady numbers */
    font-weight: 700;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.5em;
    border-radius: 12px;
    display: inline-block;
    backdrop-filter: blur(4px);
}

.time-container {
    margin-bottom: 2rem;
}

#display-message {
    font-size: 2.5vw;
    font-weight: 300;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    font-style: italic;
}

/* Utility to hide/show */
.hidden {
    display: none !important;
}

/* Return button (hidden triggers usually better for "screensavers", but let's add a subtle one) */
.return-trigger {
    position: absolute;
    bottom: 20px;
    right: 20px;
    opacity: 0.3;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.return-trigger:hover {
    opacity: 1;
}

/* --- Header & Footer UI --- */
.app-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo-link {
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    height: 40px;
    /* Adjust size as needed */
    width: auto;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.instruction-text {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.7;
}