:root {
    --bg-color: #0a0e17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-primary: #4f46e5;
    --accent-secondary: #818cf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --success: #10b981;
    --danger: #ef4444;
}

/* PIN Overlay Styles */
.pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(20px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.pin-overlay.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.pin-container {
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.pin-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    margin: 12px 0 4px;
}

.pin-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 40px;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 50px;
}

.dot {
    width: 14px;
    height: 14px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.dot.active {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px var(--accent-secondary);
    transform: scale(1.2);
}

.dot.error {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 0 15px var(--danger);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.key {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    transition: all 0.2s ease;
    box-shadow: none;
}

.key:active {
    background: var(--accent-primary);
    transform: scale(0.9);
}

.key.delete {
    font-size: 1.25rem;
}

.key.empty {
    visibility: hidden;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 400px;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.15), transparent);
}

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

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo h1 span {
    color: var(--accent-secondary);
    font-weight: 500;
}

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

main {
    flex: 1;
}

.input-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 4px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    outline: none;
}

.unit {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
}

.options {
    margin-bottom: 32px;
}

.toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.toggle input {
    display: none;
}

.slider {
    width: 44px;
    height: 24px;
    background: var(--card-bg);
    border-radius: 12px;
    position: relative;
    transition: 0.3s;
    border: 1px solid var(--glass-border);
}

.slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

input:checked + .slider {
    background: var(--accent-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.label-text {
    font-size: 0.95rem;
    color: var(--text-main);
}

button {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    padding: 18px;
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:active {
    transform: scale(0.98);
}

.secondary-actions {
    margin-top: 16px;
}

.undo-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.undo-btn:active {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Animations */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.app-container > * {
    animation: slideUp 0.5s ease forwards;
}

header { animation-delay: 0.1s; }
.input-group:nth-child(1) { animation-delay: 0.2s; }
.input-group:nth-child(2) { animation-delay: 0.3s; }
.options { animation-delay: 0.4s; }
button { animation-delay: 0.5s; }
