:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --input-bg: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --accent-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --error-color: #ef4444;
    --border-radius: 16px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    color: var(--text-primary);
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* Display Box (Top Section) */
.display-container {
    background-color: var(--card-bg);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.display-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
}

.fee-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.fee-amount {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Main Card Body */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-section {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.section-header i {
    color: var(--text-secondary);
}

/* Input Styling */
input[type="date"] {
    width: 100%;
    padding: 15px;
    background-color: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Customizing the calendar icon for webkit */
    color-scheme: dark;
}

input[type="date"]:focus {
    border-color: #6366f1;
}

/* Time Controls */
.time-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.select-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.ampm-wrapper {
    flex: 0.8;
}

select {
    width: 100%;
    padding: 15px 10px;
    background-color: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.3s;
    z-index: 1;
    position: relative;
    background-color: transparent; /* Make transparent to show wrapper bg if needed, but here we keep input bg on select */
    background-color: var(--input-bg);
}

.select-icon {
    position: absolute;
    right: 10px;
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.8rem;
    z-index: 2;
}

select:focus {
    border-color: #6366f1;
}

.separator {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding-bottom: 5px;
}

/* Button */
button#clear-btn {
    margin-top: 10px;
    width: 100%;
    padding: 18px;
    min-height: 60px; /* Large touch target for primary action */
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    /* Remove tap highlight */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

button#clear-btn:hover {
    /* Only apply hover effects on devices that support hover */
    @media (hover: hover) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
        background: var(--accent-hover);
    }
}

button#clear-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* Error Message */
.error-message {
    color: var(--error-color);
    text-align: center;
    font-size: 0.9rem;
    padding: 10px;
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    display: none;
}
