/* CSS Variables and Base Styles */
:root {
    --background: hsl(0, 0%, 7%);
    --foreground: hsl(0, 0%, 95%);
    --card: hsl(0, 0%, 12%);
    --card-foreground: hsl(0, 0%, 95%);
    --popover: hsl(0, 0%, 12%);
    --popover-foreground: hsl(0, 0%, 95%);
    --primary: hsl(0, 84%, 60%);
    --primary-foreground: hsl(0, 0%, 98%);
    --secondary: hsl(0, 0%, 20%);
    --secondary-foreground: hsl(0, 0%, 95%);
    --muted: hsl(0, 0%, 15%);
    --muted-foreground: hsl(0, 0%, 65%);
    --accent: hsl(0, 84%, 60%);
    --accent-foreground: hsl(0, 0%, 98%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(0, 0%, 98%);
    --border: hsl(0, 0%, 20%);
    --input: hsl(0, 0%, 20%);
    --ring: hsl(0, 84%, 60%);
    --radius: 0.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: var(--border);
}

body {
    background: linear-gradient(135deg, var(--background) 0%, hsl(0, 15%, 10%) 100%);
    color: var(--foreground);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}

/* Link Styles */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.max-w-6xl {
    max-width: 72rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.items-center {
    align-items: center;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

/* Grid */
.md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Responsive */
@media (max-width: 768px) {
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .md\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Padding and Margin */
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.p-6 { padding: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }

.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }

/* Width and Height */
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-20 { width: 5rem; }

.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-20 { height: 5rem; }

.h-px { height: 1px; }

.w-full { width: 100%; }
.flex-1 { flex: 1 1 0%; }

/* Sizing */
.max-w-2xl { max-width: 42rem; }

/* Border Radius */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

/* Text */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.font-mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; }

/* Text Colors */
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-red-300 { color: hsl(0, 93%, 78%); }
.text-red-400 { color: hsl(0, 91%, 71%); }
.text-green-400 { color: hsl(142, 76%, 66%); }
.text-yellow-400 { color: hsl(45, 93%, 68%); }
.text-white { color: white; }

/* Background Colors */
.bg-red-500 { background-color: hsl(0, 84%, 60%); }
.bg-red-600 { background-color: hsl(0, 84%, 54%); }
.bg-red-500\/20 { background-color: hsla(0, 84%, 60%, 0.2); }
.bg-red-500\/30 { background-color: hsla(0, 84%, 60%, 0.3); }
.bg-red-500\/5 { background-color: hsla(0, 84%, 60%, 0.05); }

.bg-green-500\/20 { background-color: hsla(142, 76%, 36%, 0.2); }
.bg-yellow-500\/20 { background-color: hsla(45, 93%, 47%, 0.2); }
.bg-black\/20 { background-color: hsla(0, 0%, 0%, 0.2); }

/* Border Colors */
.border { border-width: 1px; }
.border-red-500\/10 { border-color: hsla(0, 84%, 60%, 0.1); }
.border-red-500\/20 { border-color: hsla(0, 84%, 60%, 0.2); }
.border-red-500\/30 { border-color: hsla(0, 84%, 60%, 0.3); }
.border-red-500\/40 { border-color: hsla(0, 84%, 60%, 0.4); }

.border-green-500\/20 { border-color: hsla(142, 76%, 36%, 0.2); }
.border-green-500\/30 { border-color: hsla(142, 76%, 36%, 0.3); }
.border-yellow-500\/20 { border-color: hsla(45, 93%, 47%, 0.2); }
.border-yellow-500\/30 { border-color: hsla(45, 93%, 47%, 0.3); }

/* Transitions */
.transition-all { transition: all 150ms ease-in-out; }
.transition-colors { transition: color 150ms ease-in-out, background-color 150ms ease-in-out, border-color 150ms ease-in-out; }
.transition-transform { transition: transform 150ms ease-in-out; }
.duration-300 { transition-duration: 300ms; }

/* Hover Effects */
.hover\:bg-red-500:hover { background-color: hsl(0, 84%, 54%); }
.hover\:bg-red-600:hover { background-color: hsl(0, 84%, 48%); }
.hover\:bg-red-500\/20:hover { background-color: hsla(0, 84%, 60%, 0.2); }
.hover\:bg-red-500\/30:hover { background-color: hsla(0, 84%, 60%, 0.3); }

.hover\:text-red-300:hover { color: hsl(0, 93%, 78%); }

.hover\:border-red-500\/30:hover { border-color: hsla(0, 84%, 60%, 0.3); }
.hover\:border-red-500\/40:hover { border-color: hsla(0, 84%, 60%, 0.4); }
.hover\:border-green-500\/30:hover { border-color: hsla(142, 76%, 36%, 0.3); }
.hover\:border-yellow-500\/30:hover { border-color: hsla(45, 93%, 47%, 0.3); }

.hover\:scale-105:hover { transform: scale(1.05); }

.group:hover .group-hover\:bg-red-500\/30 { background-color: hsla(0, 84%, 60%, 0.3); }
.group:hover .group-hover\:rotate-180 { transform: rotate(180deg); }

/* Custom Styles */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, hsl(0, 84%, 60%) 0%, hsl(0, 100%, 75%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Input Styles */
input[type="text"], input[type="range"] {
    color: var(--foreground);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px hsla(0, 84%, 60%, 0.3);
}

/* Range Slider */
.slider {
    background: hsla(0, 84%, 60%, 0.2);
    border-radius: 5px;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: hsl(0, 84%, 60%);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: hsl(0, 84%, 60%);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Checkbox Styles */
input[type="checkbox"] {
    accent-color: hsl(0, 84%, 60%);
}

/* Button Styles */
button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    outline: none;
    text-decoration: none;
}

button:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Professional button variants */
.btn-primary {
    background: linear-gradient(135deg, hsl(0, 84%, 60%) 0%, hsl(0, 84%, 54%) 100%);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, hsl(0, 84%, 54%) 0%, hsl(0, 84%, 48%) 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: hsl(0, 93%, 78%);
    border: 1px solid hsla(0, 84%, 60%, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: hsla(0, 84%, 60%, 0.1);
    border-color: hsla(0, 84%, 60%, 0.5);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* Custom Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: hsla(0, 0%, 50%, 0.3);
    transition: 0.4s;
    border-radius: 24px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background-color: hsl(0, 84%, 60%);
}

input:checked + .slider-toggle:before {
    transform: translateX(24px);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    max-width: 28rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0.5rem;
}

/* Password List Item Styles */
.password-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 0.5rem;
    background: hsla(0, 84%, 60%, 0.05);
    border: 1px solid hsla(0, 84%, 60%, 0.1);
}

.password-item .icon-container {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: hsla(0, 84%, 60%, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-display {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-top: 0.25rem;
    border: 1px solid hsla(0, 84%, 60%, 0.2);
    display: inline-block;
    width: fit-content;
}

.password-meta {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* Badge Styles */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-very-strong {
    background: hsla(142, 76%, 36%, 0.2);
    color: hsl(142, 76%, 66%);
    border: 1px solid hsla(142, 76%, 36%, 0.3);
}

.badge-strong {
    background: hsla(217, 91%, 60%, 0.2);
    color: hsl(217, 91%, 70%);
    border: 1px solid hsla(217, 91%, 60%, 0.3);
}

.badge-weak {
    background: hsla(0, 84%, 60%, 0.2);
    color: hsl(0, 91%, 71%);
    border: 1px solid hsla(0, 84%, 60%, 0.3);
}

/* Responsive Design */
@media (max-width: 640px) {
    .px-6 { padding-left: 1rem; padding-right: 1rem; }
    .py-20 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .text-5xl { font-size: 2rem; line-height: 1.2; }
    .text-4xl { font-size: 1.875rem; line-height: 1.3; }
    
    .flex.gap-4.justify-center {
        flex-direction: column;
        align-items: center;
    }
    
    .password-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Animation for copied state */
.copied-animation {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===================================
   Login & Register Page Styles
   =================================== */

/* Login/Register Container */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #111827 0%, #000000 50%, #111827 100%);
    position: relative;
    overflow: hidden;
}

/* Background Effects */
.bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(239, 68, 68, 0.05);
    backdrop-filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: pulseBg 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.bg-circle-1 {
    top: 25%;
    left: 25%;
    width: 288px;
    height: 288px;
    background: rgba(239, 68, 68, 0.1);
    animation-delay: 0s;
}

.bg-circle-2 {
    bottom: 25%;
    right: 25%;
    width: 384px;
    height: 384px;
    background: rgba(239, 68, 68, 0.05);
    animation-delay: 1s;
}

@keyframes pulseBg {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Login Content */
.login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 10;
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 28rem;
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid #374151;
    border-radius: 0.75rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.6s ease-out;
}

.card-header {
    padding: 1.5rem 1.5rem 0;
    text-align: center;
}

.header-icon {
    font-size: 1.75rem;
    color: rgb(220, 38, 38);
}

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.card-description {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Login Form */
.login-form {
    padding: 1.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    color: #ffffff;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: #6b7280;
}

.form-input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 0.75rem;
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-button:hover:not(:disabled) {
    background: #b91c1c;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.25);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-text {
    display: inline-block;
}

.loading-spinner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Remember Me Checkbox */
.remember-me {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: rgba(31, 41, 55, 0.5);
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(156, 163, 175, 0.5);
    border-radius: 0.375rem;
    background: rgba(31, 41, 55, 0.6);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 
                inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: rgba(156, 163, 175, 0.8);
    background: rgba(31, 41, 55, 0.8);
}

.checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(to right, #dc2626, #991b1b);
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: block;
}

.checkbox-text {
    color: #d1d5db;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.form-footer a {
    color: #4F46E5;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: #4338CA;
}

.form-footer a:visited {
    color: #4F46E5;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #1f2937;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border: 1px solid #374151;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-message {
    font-size: 0.875rem;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design for Login/Register */
@media (max-width: 768px) {
    .login-card {
        max-width: 100%;
    }
    
    .toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .login-card {
        max-width: 100%;
    }
}
