/* Auth styles - feo.cz branding */
:root {
    /* FEO.cz inspired color palette */
    --bg-primary: #0a0b0d;
    --bg-secondary: #1a1d21;
    --bg-tertiary: #252830;
    --border-primary: #3a3f47;
    --border-secondary: #2a2f36;
    --text-primary: #ffffff;
    --text-secondary: #b8bcc5;
    --text-muted: #8a8f98;
    --accent-primary: #ff6b35;
    --accent-secondary: #ff8c42;
    --accent-success: #56c568;
    --accent-warning: #ffa726;
    --accent-danger: #ef5350;
    --feo-blue: #2d9cdb;
    --feo-light-blue: #4fc3f7;
    --feo-orange: #ff6b35;
    --feo-light-orange: #ff8c42;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-light: rgba(255, 107, 53, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Neon background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: -2;
}

.neon-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25vw;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    z-index: -1;
    pointer-events: none;
    user-select: none;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.neon-wrapper {
    position: relative;
    display: inline-flex;
    filter: brightness(40%);
    overflow: hidden;
    background: #000000;
    padding: 20px;
}



.neon-text {
    min-height: 700px;
    color: #ffffff;
    background: #000000;
    font-size: 25vw;
    font-weight: bold;
    font-family: Arial;
    text-transform: uppercase;
    opacity: 0.08;
}

.neon-text::before {
    content: 'FEO';
    position: absolute;
    mix-blend-mode: difference;
    filter: blur(1px);
}

.neon-gradient {
    background: linear-gradient(8deg, #626262 4.927083333333334%,#d60e5c 97.84374999999999%);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: multiply;
}

.neon-dodge {
    background: radial-gradient(circle, #ffffff, #660b2e 205%) center / 25% 25%;
    position: absolute;
    top: -100%;
    left: -100%;
    right: 0;
    bottom: 0;
    mix-blend-mode: color-dodge;
    animation: dodge-area 10s linear infinite 1s;
    pointer-events: none;
}

.neon-dodge-vertical {
    background: radial-gradient(circle, #ffffff, #000000 0.8%) center / 0.1% 200%;
    position: absolute;
    top: -150%;
    left: -100%;
    right: 0;
    bottom: -50%;
    mix-blend-mode: color-dodge;
    animation: dodge-area-vertical 7s linear infinite 3.5s;
    pointer-events: none;
}

.neon-dodge-horizontal {
    background: radial-gradient(circle, #ffffff, #000000 0.8%) center / 200% 0.1%;
    position: absolute;
    top: -100%;
    left: -150%;
    right: -50%;
    bottom: 0;
    mix-blend-mode: color-dodge;
    animation: dodge-area-horizontal 13s ease-in-out infinite 7s;
    pointer-events: none;
}

@keyframes dodge-area {
    to {
        transform: translate(50%,50%);
    }
}

@keyframes dodge-area-vertical {
    to {
        transform: translate(33%, 50%);
    }
}

@keyframes dodge-area-horizontal {
    0% { transform: translate(-150%, 33%); }
    75% { transform: translate(25%, 33%); }
    76% { transform: translate(25%, 33%); }
    90% { transform: translate(12%, 33%); }
    100% { transform: translate(50%, 33%); }
}


.container {
    background: rgba(26, 29, 33, 0);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 8px 24px var(--shadow);
    backdrop-filter: blur(5px);
}

h1 {
    text-align: center;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 600;
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo img {
    height: 48px;
    opacity: 0.9;
}

.return-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-left: 3px solid var(--accent-orange);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.return-info strong {
    color: var(--text-primary);
}

.user-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-success);
    border-left: 3px solid var(--accent-success);
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.user-info h3 {
    margin: 0 0 16px 0;
    color: var(--accent-success);
    font-size: 18px;
    font-weight: 600;
}

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

.user-info strong {
    color: var(--text-primary);
}

.providers {
    margin: 24px 0;
}

.providers h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.provider {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.provider-container .provider {
    margin-bottom: 0;
}

.provider-content {
    flex: 1;
}

.provider:hover:not(.disabled) {
    border-color: var(--feo-blue);
    background: var(--bg-secondary);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(45, 156, 219, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.provider:active:not(.disabled) {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.provider.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border-secondary);
}

.provider h4 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.provider p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.provider .status-disabled {
    color: var(--accent-danger);
    font-weight: 600;
    font-size: 12px;
    margin-top: 8px;
}

/* External provider styling - material design */
.provider.external-provider {
    text-decoration: none;
    border: none;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
}

.provider.external-provider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2e7d32, #388e3c);
    opacity: 0.25;
    transition: opacity 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 0;
}

.provider.external-provider > * {
    position: relative;
    z-index: 1;
}

.provider.external-provider:hover:not(.disabled) {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.16),
        0 2px 4px rgba(0, 0, 0, 0.32);
}

.provider.external-provider:hover:not(.disabled)::before {
    opacity: 1;
}

.provider.external-provider:active:not(.disabled) {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
}

.provider.external-provider span {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.provider.external-provider.disabled {
    background: var(--bg-tertiary);
    opacity: 0.5;
}

.provider.inline-auth-form.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.provider.disabled .status-disabled {
    opacity: 1;
}


/* Provider container for unified outline */
.provider-container {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.provider-container:hover:not(.disabled) {
    outline-color: rgba(86, 197, 104, 0.5);
}

.provider-container.expanded {
    outline-color: rgba(86, 197, 104, 0.6);
}

.provider-container:focus-within {
    outline-color: rgba(86, 197, 104, 0.7);
}

/* Collapsible inline provider styling - material design */
.provider.inline-auth-form {
    cursor: pointer;
    justify-content: space-between;
    border: none;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
}

.provider.inline-auth-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    opacity: 0;
    transition: opacity 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 0;
}

.provider.inline-auth-form > * {
    position: relative;
    z-index: 1;
}

.provider-container:hover:not(.disabled) .provider.inline-auth-form {
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.16),
        0 1px 3px rgba(0, 0, 0, 0.32);
}

.provider-container:hover:not(.disabled) .provider.inline-auth-form::before {
    opacity: 1;
}

.provider-container.expanded .provider.inline-auth-form {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
}

.provider-container.expanded .provider.inline-auth-form::before {
    opacity: 1;
}


.expand-icon {
    color: var(--text-secondary);
    font-size: 14px;
    transition: transform 0.2s ease;
    user-select: none;
}

.provider.inline-auth-form.expanded .expand-icon {
    transform: rotate(180deg);
}

.login-content {
    margin-top: -1px;
    border: 1px solid var(--border-primary);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: var(--bg-tertiary);
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-content.expanded {
    padding: 16px;
    padding-bottom: 12px;
    max-height: 300px;
    opacity: 1;
}

.logout-btn {
    background: var(--accent-danger);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.logout-btn:hover {
    background: #d73a49;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 83, 80, 0.3);
}

.continue-link {
    text-align: center;
    margin-top: 24px;
}

.continue-link a {
    color: var(--feo-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 24px;
    border: 1px solid var(--feo-blue);
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    background: linear-gradient(135deg, transparent, var(--shadow-light));
}

.continue-link a:hover {
    background: linear-gradient(135deg, var(--feo-blue), var(--feo-light-blue));
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px var(--shadow-light);
}

/* Form styling */
form {
    margin: 0;
}

input[type="hidden"] {
    display: none;
}

/* Provider icons */
.provider-icon {
    width: 32px;
    height: 32px;
    opacity: 0.9;
    flex-shrink: 0;
}

/* Local authentication form */
.local-auth-form {
    flex-direction: column;
    align-items: stretch;
}

.local-auth-form .provider-icon {
    align-self: flex-start;
    margin-bottom: 12px;
}

.local-login-form {
    width: 100%;
    margin-top: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--feo-blue);
    box-shadow: 0 0 0 2px var(--shadow-light);
}

.login-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 0;
    background: var(--bg-tertiary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #2e7d32, #388e3c);
    opacity: 0.25;
    transition: opacity 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: -1;
}

.login-btn:hover {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.16),
        0 2px 4px rgba(0, 0, 0, 0.32);
}

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

/* Error message */
.error-message {
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid var(--accent-danger);
    border-left: 3px solid var(--accent-danger);
    color: var(--accent-danger);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Back link */
.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.back-link a:hover {
    color: var(--feo-blue);
    text-decoration: none;
}

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

    .container {
        padding: 24px;
    }

    h1 {
        font-size: 20px;
    }
}

/* Loading state */
.provider.loading {
    pointer-events: none;
    opacity: 0.7;
}

.provider.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid var(--border-primary);
    border-top: 2px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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