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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    padding: 10px;
}

.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 80%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 80%;
    animation-delay: 4s;
}

.shape:nth-child(4) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.logo a {
    text-decoration: none;
    color: inherit;
}

/* Login Logo Styles */
.login-logo {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.logo h1 {
    background: var(--rainbow-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 700;
    margin-bottom: 8px;
    background-size: 200% 100%;
    animation: rainbow-shift 3s ease-in-out infinite;
    display: none; /* Verstecke den Text, da das Logo angezeigt wird */
}

.logo p {
    color: #666;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.input-container {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e8ecf4;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #667eea;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.remember-me label {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 4px 8px;
}

.forgot-password:hover {
    color: #764ba2;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.3);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: #9ca3af;
    font-size: 14px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e8ecf4;
    z-index: -1;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 16px;
}

.signup-link {
    text-align: center;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.signup-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    padding: 4px 8px;
    display: inline-block;
    min-height: 44px;
    line-height: 1.4;
}

.signup-link a:hover {
    color: #764ba2;
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.language-selector select {
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-height: 36px;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    display: none;
    line-height: 1.4;
    white-space: pre-line;
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid rgba(40, 167, 69, 0.2);
    display: none;
    line-height: 1.4;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablet Breakpoint */
@media (max-width: 768px) {
    .login-container {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .background-shapes .shape {
        opacity: 0.8;
    }
    
    .login-logo {
        max-width: 180px;
        max-height: 70px;
    }
    
    .logo h1 {
        font-size: clamp(22px, 4vw, 28px);
        display: none; /* Verstecke den Text, da das Logo angezeigt wird */
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .forgot-password {
        align-self: flex-end;
    }
}

/* Mobile Breakpoint */
@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }
    
    .login-container {
        width: 100%;
        max-width: none;
        padding: 24px 20px;
        margin: 0;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }
    
    .logo {
        margin-bottom: 24px;
    }
    
    .login-logo {
        max-width: 160px;
        max-height: 60px;
    }
    
    .logo h1 {
        font-size: clamp(20px, 6vw, 24px);
        display: none; /* Verstecke den Text, da das Logo angezeigt wird */
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input {
        padding: 14px 16px 14px 44px;
        font-size: 16px;
    }
    
    .input-icon {
        left: 14px;
        font-size: 16px;
    }
    
    .password-toggle {
        right: 12px;
        font-size: 16px;
    }
    
    .remember-forgot {
        margin-bottom: 20px;
    }
    
    .remember-me input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .language-selector select {
        font-size: 13px;
    }
    
    .background-shapes .shape {
        opacity: 0.6;
    }
    
    .shape:nth-child(1) {
        width: 60px;
        height: 60px;
    }
    
    .shape:nth-child(2) {
        width: 80px;
        height: 80px;
    }
    
    .shape:nth-child(3) {
        width: 40px;
        height: 40px;
    }
    
    .shape:nth-child(4) {
        width: 70px;
        height: 70px;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 320px) {
    .login-container {
        padding: 20px 16px;
    }
    
    .login-logo {
        max-width: 140px;
        max-height: 50px;
    }
    
    .logo h1 {
        font-size: 20px;
        display: none; /* Verstecke den Text, da das Logo angezeigt wird */
    }
    
    .form-group input {
        padding: 12px 14px 12px 40px;
    }
    
    .input-icon {
        left: 12px;
        font-size: 14px;
    }
    
    .password-toggle {
        right: 10px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .login-btn {
        -webkit-appearance: none;
        border-radius: 12px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .shape {
        animation: none;
    }
    
    .login-btn:hover {
        transform: none;
    }
    
    .loading-spinner {
        animation: none;
    }
    
    .logo h1 {
        animation: none;
        display: none; /* Verstecke den Text, da das Logo angezeigt wird */
    }
}

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

/* Reaktivierungs-Modal Styles */
.reactivation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-body {
    padding: 20px 24px;
}

.modal-body p {
    margin-bottom: 12px;
    color: #4b5563;
    line-height: 1.5;
}

.reactivation-question {
    font-weight: 500;
    color: #1f2937 !important;
    margin-top: 20px !important;
}

.modal-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 14px;
}

.modal-actions .btn-outline {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.modal-actions .btn-outline:hover {
    background: #f9fafb;
    color: #374151;
}

.modal-actions .btn-primary {
    background: #667eea;
    color: white;
}

.modal-actions .btn-primary:hover {
    background: #5a67d8;
}

.modal-actions .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 640px) {
    .modal-content {
        margin: 10px;
        max-width: none;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}