:root {
    --bg-color: #0d0d0d;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #7c4dff;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --success: #00e676;
    --error: #ff5252;
    --font-main: 'Outfit', sans-serif;
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(124, 77, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 230, 118, 0.05) 0%, transparent 40%);
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
}

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

h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.accent {
    color: var(--accent-color);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    padding: 5px 15px 5px 5px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.user-initials {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Tab Management */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    margin-bottom: 20px;
}

/* Punch Card Specifics */
.clock-display {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.date-display {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.punch-btn {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-color), #b388ff);
    color: white;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(124, 77, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    position: relative;
    overflow: hidden;
}

.punch-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.6);
}

.btn-icon { font-size: 2.5rem; margin-bottom: 10px; }
.btn-text { font-size: 1.1rem; font-weight: 600; }

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.pulse-dot.scanning {
    background: var(--accent-color);
    animation: pulse 1.5s infinite;
}

.pulse-dot.success { background: var(--success); }
.pulse-dot.error { background: var(--error); }

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.next-action-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.next-action-card .label { color: var(--text-secondary); font-size: 0.85rem; }
.next-action-card .value { font-weight: 600; color: var(--success); }

/* Setup & Inputs */
.input-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-left: 5px;
}

input {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--accent-color);
}

.bt-setup {
    text-align: left;
    margin-bottom: 30px;
}

.setup-input-spacing {
    margin-bottom: 12px;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
}

.bt-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 10px 15px;
    border-radius: 12px;
}

.device-name {
    flex-grow: 1;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-secondary {
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--accent-color);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    background: var(--accent-color);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 8px 16px rgba(124, 77, 255, 0.2);
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 10px 20px 25px;
    border-top: 1px solid var(--glass-border);
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-icon { font-size: 1.2rem; font-weight: 800; }
.nav-label { font-size: 0.7rem; }

/* History List */
.history-list {
    margin-top: 15px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.history-item {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hi-left { display: flex; flex-direction: column; }
.hi-type { font-weight: 600; font-size: 0.95rem; }
.hi-date { font-size: 0.75rem; color: var(--text-secondary); }
.hi-time { font-weight: 700; font-size: 1.1rem; color: var(--accent-color); }

.text-center { text-align: center; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
    font-style: italic;
}
