:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --bg-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --bg-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --bg-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --bg-gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --card-bg: #ffffff;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient-1);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 92, 246, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.2), transparent 50%);
    animation: backgroundShift 15s ease infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Auth Card */
.auth-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 48px 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.6s ease;
}

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

.logo-container {
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 64px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.main-title {
    font-size: 28px;
    font-weight: 700;
    background: var(--bg-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    transition: var(--transition);
}

.feature-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.feature-icon {
    font-size: 24px;
}

/* Google Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Security Info */
.security-info {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.security-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--bg-gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

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

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* PIN Input */
.pin-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.pin-digit {
    width: 50px;
    height: 60px;
    font-size: 24px;
    text-align: center;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pin-digit:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard specific styles */
.dashboard-header {
    background: white;
    padding: 20px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 700;
    background: var(--bg-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-menu {
    display: flex;
    gap: 16px;
    align-items: center;
}

.add-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-gradient-1);
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.add-btn:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Vault Items Grid */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 24px;
}

.vault-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.vault-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.vault-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.vault-item-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.type-account { background: #dbeafe; color: #1e40af; }
.type-note { background: #fef3c7; color: #92400e; }
.type-credit_card { background: #fce7f3; color: #9f1239; }
.type-identity { background: #e0e7ff; color: #3730a3; }
.type-server { background: #d1fae5; color: #065f46; }

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        padding: 32px 24px;
    }
    
    .main-title {
        font-size: 24px;
    }
    
    .vault-grid {
        grid-template-columns: 1fr;
    }
    
    .pin-input-container {
        gap: 8px;
    }
    
    .pin-digit {
        width: 45px;
        height: 55px;
    }
}

/* Setup Steps */
.setup-step {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Backup Codes Display */
.backup-codes-section {
    background: #f9fafb;
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
}

.codes-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.codes-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.codes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.code-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.code-item code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.copy-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    transform: scale(1.2);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.item-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.type-btn {
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    text-align: left;
}

.type-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }
