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

:root {
    --bg-main: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f9fafb;
    --accent: #059669;
    --accent-glow: rgba(5, 150, 105, 0.1);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.screen {
    width: 100vw;
    height: 100vh;
    max-width: 480px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-surface);
}

.hidden { display: none !important; }

/* Auth / Lock Screen */
#auth-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.lock-shield {
    width: 80px;
    height: 80px;
    background: var(--bg-main);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 24px;
}

.lock-shield svg { width: 32px; height: 32px; }

#auth-screen h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

#auth-screen p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 48px;
}

/* Professional Buttons */
.btn {
    width: 100%;
    max-width: 280px;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.primary-btn {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.primary-btn:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.secondary-btn {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.secondary-btn:hover {
    background: var(--border);
}

/* Main Dashboard */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

header h1 { font-size: 24px; font-weight: 700; color: var(--text-primary); }

.header-actions { display: flex; gap: 12px; }

.icon-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* OTP Cards */
.otp-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.otp-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.otp-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.otp-code {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary); /* 淺色模式下數字用深色更專業 */
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.progress-track {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--bg-main);
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 100%;
    transform-origin: left;
    transition: transform 1s linear;
}

/* Modal UI */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal {
    background: var(--bg-surface);
    width: 100%;
    max-width: 360px;
    padding: 32px;
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.modal h2 { margin-bottom: 24px; font-size: 22px; text-align: center; }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.input-group input {
    width: 100%;
    padding: 14px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
}
.input-group input:focus { outline: none; border-color: var(--accent); background: #fff; }

.modal-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; align-items: center; }

/* Toast */
.toast {
    position: fixed;
    bottom: 40px;
    background: #1f2937;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}
