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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --dark-bg: #0a0e1a;
    --card-bg: #1a1f35;
    --card-hover: #242b45;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(26, 31, 53, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Landing Page Styles */
.landing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.btn-nav {
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 500;
}

.btn-nav:hover {
    color: var(--primary);
}

.btn-register {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding: 4rem 0;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-image {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-icon {
    font-size: 15rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.3));
    animation: float 6s ease-in-out infinite;
}

.features-section {
    padding: 6rem 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.landing-footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 968px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }
}

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter',
        sans-serif;
}

body {
    background: var(--dark-bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(236, 72, 153, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

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

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.5);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-button .form-control {
    padding-right: 50px;
}

.btn-input-action {
    position: absolute;
    right: 8px;
    background: var(--primary);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-input-action:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Dashboard */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

.welcome-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.welcome-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.username-highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-icon-only {
    width: 42px;
    height: 42px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon-only:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-logout {
    padding: 10px 18px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-add {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-add:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-generate {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-generate:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Search */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 14px 18px 14px 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

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

/* Password Grid */
.password-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.password-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.password-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    background: var(--card-hover);
}

.password-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.website-info {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.website-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.website-details {
    flex: 1;
}

.website-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.website-username {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-icon-card {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-card:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.card-body {
    margin-bottom: 1.5rem;
}

.password-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 14px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-field {
    font-family: 'Courier New', monospace;
    color: var(--success);
    letter-spacing: 3px;
    font-size: 1rem;
    flex: 1;
}

.btn-toggle-pwd {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

.btn-toggle-pwd:hover {
    color: var(--primary);
}

.card-footer {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.btn-card {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-edit {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-edit:hover {
    background: var(--primary);
    color: white;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

/* Empty State */
.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--primary);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    border: 1px solid var(--glass-border);
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--primary);
}

.close-modal {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Generator Styling */
.generator-result {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
}

.generated-password {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    word-break: break-all;
    color: var(--success);
    flex: 1;
    margin-right: 1rem;
}

.btn-copy-generated {
    background: var(--primary);
    border: none;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-generated:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: rgba(99, 102, 241, 0.2);
    outline: none;
    -webkit-appearance: none;
    margin: 1rem 0 0.5rem;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.generator-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
}

.flash-msg {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    color: white;
    background: var(--card-bg);
    border-left: 4px solid;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.5s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.flash-msg.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.15);
}

.flash-msg.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .welcome-section {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .password-grid {
        grid-template-columns: 1fr;
    }

    .action-bar {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .auth-card {
        padding: 2rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 1rem;
    }

    .welcome-text h1 {
        font-size: 1.25rem;
    }

    .profile-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .card-footer {
        flex-direction: column;
    }

    .btn-card {
        width: 100%;
    }
}