:root {
    --bg-color: #121212;
    --panel-bg: #1e1e1e;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --accent-in: #4ade80;
    /* bright green */
    --accent-in-hover: #22c55e;
    --accent-out: #60a5fa;
    /* bright blue */
    --accent-out-hover: #3b82f6;
    --accent-vacation: #f59e0b;
    /* yellow/orange for vacation */
    --focus-ring: #fbbf24;
    --border-radius: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    text-align: center;
    padding: 30px 20px;
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

#currentTime {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

#currentDate {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.user-selector-container {
    display: flex;
    justify-content: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.user-select {
    width: 100%;
    padding: 20px;
    font-size: 2rem;
    font-weight: bold;
    border-radius: 16px;
    background: var(--panel-bg);
    color: var(--text-main);
    border: 3px solid #444;
    cursor: pointer;
    text-align: center;
    appearance: none;
}

.user-select:focus {
    outline: none;
    border-color: var(--focus-ring);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.actions {
    display: flex;
    gap: 20px;
}

.action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.action-btn:focus-visible {
    outline: 6px solid var(--focus-ring);
    outline-offset: 4px;
}

.action-btn .icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.action-btn .text {
    font-size: 2.5rem;
    font-weight: 800;
}

.clock-in {
    background: linear-gradient(135deg, var(--accent-in), var(--accent-in-hover));
    color: #000;
    box-shadow: 0 15px 35px rgba(74, 222, 128, 0.3);
}

.clock-in:hover,
.clock-in:active {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(74, 222, 128, 0.5);
}

.clock-out {
    background: linear-gradient(135deg, var(--accent-out), var(--accent-out-hover));
    color: #000;
    box-shadow: 0 15px 35px rgba(96, 165, 250, 0.3);
}

.clock-out:hover,
.clock-out:active {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(96, 165, 250, 0.5);
}

.vacation-btn {
    background: linear-gradient(135deg, var(--accent-vacation), #d97706);
    color: #000;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.3);
}

.vacation-btn:hover,
.vacation-btn:active {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(245, 158, 11, 0.5);
}

.action-btn:active {
    transform: translateY(2px);
}

.status-panel,
.history-panel {
    background: var(--panel-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.status-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    flex-direction: column;
}

.status-item .label {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.time-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.status-message {
    font-size: 1.5rem;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-list li {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.3rem;
    display: flex;
    justify-content: space-between;
}

.history-date {
    font-weight: bold;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.active-status {
    color: var(--accent-in);
    animation: pulse 2.5s infinite ease-in-out;
}

/* Admin Panel Styles */
.admin-login-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.admin-login-btn:hover {
    opacity: 1;
}

.hidden {
    display: none !important;
}

.admin-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: #111;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    border: 2px solid #555;
    z-index: 1000;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.admin-header h2 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.admin-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.user-add-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-input-text {
    flex: 1;
    padding: 15px;
    font-size: 1.2rem;
    border-radius: 8px;
    border: 1px solid #444;
    background: #222;
    color: white;
}

.admin-user-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-user-item {
    background: #333;
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.user-del-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.2s;
    font-size: 1.1rem;
}

.admin-btn:hover {
    filter: brightness(1.2);
}

.logout-btn {
    background: #ef4444;
    color: white;
}

.save-btn {
    background: var(--accent-in);
    color: black;
}

.delete-btn {
    background: #ef4444;
    color: white;
}

.admin-list-header {
    display: grid;
    grid-template-columns: 80px 100px 3fr 120px;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1rem;
}

.admin-history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-item {
    display: grid;
    grid-template-columns: 80px 100px 3fr 120px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    align-items: center;
}

.admin-input-time {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-family: inherit;
    text-align: center;
    width: 100%;
}

.admin-status-select {
    background: #222;
    color: white;
    border: 1px solid #444;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.admin-time-inputs {
    display: flex;
    gap: 5px;
}

.admin-item-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}