/**
 * Authentication Pages - Linkeyz Dark Theme
 * Modern design with black background and turquoise accents
 */

/* Design System Variables */
:root {
    /* Linkeyz Colors */
    --color-primary: #4DD0C0;
    --color-primary-hover: #3FBFAF;
    --color-primary-dark: #2FA89A;

    /* Base Colors */
    --color-bg-main: #000000;
    --color-bg-card: #0D0D0D;
    --color-bg-secondary: #1A1A1A;
    --color-bg-tertiary: #262626;
    --color-bg-input: #0F0F0F;

    /* Text Colors */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #A0A0A0;
    --color-text-tertiary: #666666;

    /* Border Colors */
    --color-border: #1F1F1F;
    --color-border-light: #2A2A2A;
    --color-border-medium: #404040;

    /* Error Colors */
    --color-error: #EF4444;
    --color-error-light: #FCA5A5;
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-error-border: rgba(239, 68, 68, 0.3);

    /* Success Colors */
    --color-success: #10B981;
    --color-success-light: #6EE7B7;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-success-border: rgba(16, 185, 129, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-glow-primary: 0 0 0 3px rgba(77, 208, 192, 0.2);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Body Styles with Animated Background */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--color-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow: hidden;
}

/* Multi-layer Animated gradient background for depth */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 30%, rgba(77, 208, 192, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(93, 223, 208, 0.08) 0%, transparent 40%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(77, 208, 192, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(77, 208, 192, 0.04) 0%, transparent 50%);
    animation: rotate 45s linear infinite reverse;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Login Card - Premium Glass Design with Deep Shadows */
.login-card {
    background: linear-gradient(135deg,
        rgba(13, 13, 13, 0.95) 0%,
        rgba(20, 20, 20, 0.9) 100%);
    border: 1px solid transparent;
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 0 0 1px rgba(77, 208, 192, 0.1),
        0 8px 16px -4px rgba(0, 0, 0, 0.8),
        0 20px 40px -8px rgba(0, 0, 0, 0.7),
        0 40px 80px -16px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

/* Gradient border effect */
.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(77, 208, 192, 0.3) 0%,
        rgba(77, 208, 192, 0.1) 50%,
        rgba(77, 208, 192, 0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

.login-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 0 0 1px rgba(77, 208, 192, 0.2),
        0 12px 24px -4px rgba(0, 0, 0, 0.9),
        0 24px 48px -8px rgba(0, 0, 0, 0.8),
        0 48px 96px -16px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(77, 208, 192, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Header Styles */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: inline-flex;
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg,
        rgba(26, 26, 26, 1) 0%,
        rgba(38, 38, 38, 1) 100%);
    border: 1px solid rgba(77, 208, 192, 0.15);
    border-radius: 22px;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    margin: 0 auto 24px;
    transition: all var(--transition-normal);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 16px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(77, 208, 192, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.logo:hover::before {
    opacity: 1;
    animation: shimmer 2s linear infinite;
}

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

.logo:hover {
    border-color: rgba(77, 208, 192, 0.4);
    transform: translateY(-4px) scale(1.08);
    box-shadow:
        0 0 0 1px rgba(77, 208, 192, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.6),
        0 16px 32px rgba(0, 0, 0, 0.5),
        0 24px 48px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(77, 208, 192, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.login-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg,
        #4DD0C0 0%,
        #5DDFD0 35%,
        #6EE7E0 65%,
        #4DD0C0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    text-shadow: 0 0 40px rgba(77, 208, 192, 0.3);
    filter: drop-shadow(0 2px 8px rgba(77, 208, 192, 0.2));
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.login-header p {
    color: var(--color-text-secondary);
    font-size: 15px;
    font-weight: 500;
}

/* Mode Toggle */
.mode-toggle {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(77, 208, 192, 0.08);
    position: relative;
}

.mode-toggle::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(77, 208, 192, 0.5) 50%,
        transparent 100%);
}

.mode-toggle a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all var(--transition-fast);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

.mode-toggle a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group:last-of-type {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

/* Input Wrapper for Icon Support */
.input-wrapper {
    position: relative;
}

.form-group input,
.input-wrapper input {
    width: 100%;
    padding: 15px 18px;
    padding-right: 48px;
    border: 1px solid rgba(77, 208, 192, 0.08);
    border-radius: 12px;
    background: linear-gradient(135deg,
        rgba(15, 15, 15, 0.9) 0%,
        rgba(20, 20, 20, 0.8) 100%);
    font-size: 15px;
    font-weight: 400;
    color: var(--color-text-primary);
    transition: all var(--transition-normal);
    outline: none;
    font-family: inherit;
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.02),
        0 1px 0 rgba(255, 255, 255, 0.03);
}

.form-group input::placeholder,
.input-wrapper input::placeholder {
    color: var(--color-text-tertiary);
}

.form-group input:focus,
.input-wrapper input:focus {
    border-color: rgba(77, 208, 192, 0.4);
    background: linear-gradient(135deg,
        rgba(20, 20, 20, 1) 0%,
        rgba(26, 26, 26, 0.95) 100%);
    box-shadow:
        0 0 0 1px rgba(77, 208, 192, 0.2),
        0 0 0 4px rgba(77, 208, 192, 0.1),
        0 8px 16px rgba(77, 208, 192, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03);
    transform: translateY(-1px);
}

/* Input Icon */
.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.input-wrapper input:focus + .input-icon {
    opacity: 1;
}

/* Submit Button - Premium Style */
.submit-button,
button[type="submit"] {
    width: 100%;
    padding: 17px 28px;
    background: linear-gradient(135deg,
        #4DD0C0 0%,
        #3FBFAF 50%,
        #4DD0C0 100%);
    background-size: 200% 200%;
    color: #000000;
    border: 1px solid rgba(77, 208, 192, 0.3);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow:
        0 0 0 1px rgba(77, 208, 192, 0.2),
        0 4px 8px rgba(77, 208, 192, 0.3),
        0 8px 16px rgba(77, 208, 192, 0.2),
        0 16px 32px rgba(77, 208, 192, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    margin-top: 8px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.submit-button::before,
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-button:hover::before,
button[type="submit"]:hover::before {
    width: 300px;
    height: 300px;
}

.submit-button:hover,
button[type="submit"]:hover {
    background-position: 100% 50%;
    transform: translateY(-3px);
    border-color: rgba(77, 208, 192, 0.5);
    box-shadow:
        0 0 0 1px rgba(77, 208, 192, 0.3),
        0 8px 16px rgba(77, 208, 192, 0.4),
        0 16px 32px rgba(77, 208, 192, 0.3),
        0 24px 48px rgba(77, 208, 192, 0.2),
        0 0 80px rgba(77, 208, 192, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.submit-button:active,
button[type="submit"]:active {
    transform: translateY(0);
}

.submit-button:disabled,
button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.error-message {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    border-left: 4px solid var(--color-error);
    color: var(--color-error-light);
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

/* Success Message */
.success-message {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    border-left: 4px solid var(--color-success);
    color: var(--color-success-light);
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Checkbox Styles */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

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

.form-checkbox label {
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    margin: 0;
}

.form-checkbox a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.form-checkbox a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Features Section (below login form) */
.features-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-item {
    text-align: center;
    padding: 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: all var(--transition-normal);
}

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

.feature-item .feature-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.feature-item .feature-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.feature-item .feature-description {
    font-size: 12px;
    color: var(--color-text-tertiary);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-card {
        padding: 32px 24px;
        border-radius: 12px;
    }

    .logo {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .features-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Accessibility */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Select Dropdown Styles */
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    background: var(--color-bg-input);
    font-size: 15px;
    font-weight: 400;
    color: var(--color-text-primary);
    transition: all var(--transition-normal);
    outline: none;
    font-family: inherit;
    cursor: pointer;
}

select:focus {
    border-color: var(--color-primary);
    background: var(--color-bg-secondary);
    box-shadow: var(--shadow-glow-primary);
}

select option {
    background: var(--color-bg-card);
    color: var(--color-text-primary);
}
