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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    background: #000;
}

/* Wygaszacz ekranu */
.screensaver-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.screensaver-container.hidden {
    opacity: 0;
    transform: translateY(-100px);
    pointer-events: none;
}

.screensaver-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.screensaver-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.screensaver-images img.active {
    opacity: 1;
}

#screensaver-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screensaver-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

.screensaver-hint {
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: pulse 2s ease-in-out infinite;
}

.hint-bar {
    width: 48px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 9999px;
}

.screensaver-hint p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Kontener logowania */
.login-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.login-container.active {
    opacity: 1;
    pointer-events: auto;
}

.login-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.login-form-wrapper {
    position: relative;
    z-index: 30;
    width: 100%;
    max-width: 448px;
    padding: 0 24px;
}

.login-card {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.4s ease forwards;
}

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

.login-card-content {
    padding: 32px;
}

/* Dynamiczne style formularza */
.login-card[data-bg-type="color"] {
    background-color: var(--form-bg-color);
    opacity: var(--form-opacity);
}

.login-card[data-bg-type="blur"] {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: var(--form-opacity);
}

.login-card[data-bg-type="image"] {
    background-image: var(--form-bg-image);
    background-size: cover;
    background-position: center;
    opacity: var(--form-opacity);
}

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

.user-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: scaleIn 0.3s ease 0.1s backwards;
}

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

.user-icon svg {
    stroke: var(--text-color, #ffffff);
}

.login-header h1 {
    font-size: 30px;
    font-weight: 600;
    color: var(--text-color, #ffffff);
    margin-bottom: 8px;
}

.login-header .subtitle {
    color: var(--text-color-70, rgba(255, 255, 255, 0.7));
    font-size: 14px;
}

/* Formularz */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    stroke: var(--text-color-50, rgba(255, 255, 255, 0.5));
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 12px 12px 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color, #ffffff);
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-color-50, rgba(255, 255, 255, 0.5));
}

.input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.login-button {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.login-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
}

.forgot-password {
    text-align: center;
    margin-top: 16px;
}

.forgot-password a {
    color: var(--text-color-70, rgba(255, 255, 255, 0.7));
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: var(--text-color, #ffffff);
}

.error-message {
    padding: 12px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 8px;
    color: #fee2e2;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

/* Przycisk zamknięcia */
.close-button {
    position: absolute;
    top: 32px;
    right: 32px;
    z-index: 40;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.close-button svg {
    stroke: currentColor;
}

/* DEV - Link konfiguracji */
.dev-config-link {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 50;
    padding: 8px 16px;
    background: #eab308;
    color: #000000;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.dev-config-link:hover {
    background: #facc15;
    transform: translateY(-2px);
}

/* Responsywność */
@media (max-width: 768px) {
    .login-card-content {
        padding: 24px;
    }
    
    .close-button {
        top: 16px;
        right: 16px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
}
