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

:root {
    --bg-color: #0b0e14;
    --card-bg: rgba(23, 27, 34, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-purple: #c084fc;
    --danger: #ef4444;
    --success: #10b981;
    --glass-bg: rgba(255, 255, 255, 0.03);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* App Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
}

/* Auth View */
#auth-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

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

input,
select {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Dashboard View */
.search-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.search-input {
    padding-left: 2.75rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* User List */
.user-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 5rem;
}

.user-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-info {
    flex: 1;
}

.user-email {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    word-break: break-all;
}

.user-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.type-tag {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
}

.type-subscription {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-blue);
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn:active {
    background: var(--danger);
    color: white;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    z-index: 100;
    border: none;
    font-size: 1.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    z-index: 1000;
}

.modal {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    backdrop-filter: blur(8px);
}

#toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Utilities */
.hidden {
    display: none !important;
}