* {
    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;
    padding: 20px 10px;
    overflow-x: hidden;
}

.background-shapes {
    position: fixed;
    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); }
}

.register-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);
    margin: 20px;
}

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

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

/* Register Logo Styles */
.register-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;
    line-height: 1.4;
}

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

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

.input-container {
    position: relative;
}

/* Ensure proper positioning for dropdown */
.form-group .input-container {
    position: relative;
}

.form-group input,
.form-group select {
    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,
.form-group select: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;
}

/* Select-specific styles */
.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 50px;
}

.form-group select option {
    padding: 8px 12px;
    background: white;
    color: #333;
}

.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;
}

.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e8ecf4;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-weak { background: #dc3545; width: 25%; }
.strength-fair { background: #fd7e14; width: 50%; }
.strength-good { background: #ffc107; width: 75%; }
.strength-strong { background: #28a745; width: 100%; }

.password-requirements {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.requirement.met {
    color: #28a745;
}

.requirement.unmet {
    color: #dc3545;
}

.terms-privacy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.terms-privacy input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    margin-top: 1px;
    flex-shrink: 0;
    cursor: pointer;
}

.terms-privacy label {
    cursor: pointer;
    flex: 1;
    line-height: 1.5;
}

.terms-privacy a {
    color: #667eea;
    text-decoration: none;
    padding: 2px 4px;
    display: inline;
    line-height: 1.5;
}

.terms-privacy a:hover {
    text-decoration: underline;
}

.register-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;
}

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

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

.register-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;
}

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

.login-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;
}

.login-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;
}

.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;
}

.field-error {
    border-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.05) !important;
}

.field-success {
    border-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.05) !important;
}

.field-message {
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1.3;
}

.field-message-success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.field-message-error {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Tablet Breakpoint */
@media (max-width: 768px) {
    .register-container {
        padding: 32px 24px;
        border-radius: 20px;
        margin: 15px;
    }
    
    .background-shapes .shape {
        opacity: 0.8;
    }
    
    .register-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 */
    }
    
    .terms-privacy {
        gap: 10px;
    }
    
    .terms-privacy input[type="checkbox"] {
        margin-top: 0;
    }
}

/* Large Mobile Breakpoint */
@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }
    
    .register-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);
        backdrop-filter: blur(10px);
    }
    
    .logo {
        margin-bottom: 24px;
    }
    
    .register-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 */
    }
    
    .logo p {
        font-size: 13px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group input,
    .form-group select {
        padding: 14px 16px 14px 44px;
        font-size: 16px;
    }
    
    .form-group select {
        padding-right: 44px;
    }
    
    .input-icon {
        left: 14px;
        font-size: 16px;
    }
    
    .password-toggle {
        right: 12px;
        font-size: 16px;
        padding: 8px;
    }
    
    .terms-privacy {
        font-size: 13px;
        margin-bottom: 20px;
        gap: 8px;
    }
    
    .terms-privacy input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-top: 0;
    }
    
    .register-btn {
        padding: 14px;
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .language-selector select {
        font-size: 13px;
    }
    
    .error-message,
    .success-message {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .background-shapes {
        display: none;
    }
    
    /* Disable hover effects on mobile */
    .register-btn:hover {
        transform: none;
        box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 320px) {
    .register-container {
        padding: 20px 16px;
    }
    
    .register-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,
    .form-group select {
        padding: 12px 14px 12px 40px;
    }
    
    .form-group select {
        padding-right: 40px;
    }
    
    .input-icon {
        left: 12px;
        font-size: 14px;
    }
    
    .password-toggle {
        right: 10px;
        font-size: 14px;
    }
    
    .register-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .terms-privacy {
        font-size: 12px;
        gap: 6px;
    }
    
    .terms-privacy input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-top: 0;
    }
    
    .password-requirements {
        font-size: 11px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 10px;
    }
    
    .register-container {
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .logo {
        margin-bottom: 16px;
    }
    
    .register-logo {
        max-width: 120px;
        max-height: 45px;
    }
    
    .logo h1 {
        font-size: 22px;
        display: none; /* Verstecke den Text, da das Logo angezeigt wird */
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .password-strength {
        margin-top: 6px;
    }
    
    .password-requirements {
        font-size: 11px;
    }
}

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

/* Safe area support for modern phones */
@supports (padding: env(safe-area-inset-top)) {
    @media (max-width: 480px) {
        body {
            padding-top: max(15px, env(safe-area-inset-top));
            padding-bottom: max(15px, env(safe-area-inset-bottom));
        }
    }
}

/* High DPI screens */
@media (max-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
    .register-container {
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    }
}

/* Focus improvements for mobile */
@media (max-width: 480px) {
    .form-group input:focus,
    .form-group select:focus {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .register-btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .password-toggle:hover {
        color: #9ca3af;
    }
    
    .terms-privacy a:hover {
        text-decoration: none;
    }
    
    .login-link a:hover {
        color: #667eea;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .shape {
        animation: none;
    }
    
    .register-btn:hover {
        transform: none;
    }
    
    .form-group input,
    .form-group select {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
    
    .strength-fill {
        transition: 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%; }
}

/* Mapbox Location Search Dropdown Styles */
.cities-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

.city-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.city-item:hover,
.city-item.highlighted {
    background-color: #f8f9fa;
}

.city-item:last-child {
    border-bottom: none;
}

.city-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.city-details {
    font-size: 0.85em;
    color: #666;
    display: flex;
    gap: 8px;
}

.city-zip {
    font-weight: 500;
    color: #007bff;
}

.city-state {
    color: #666;
}

.city-country {
    color: #999;
}

/* Dark mode support for dropdown */
[data-theme="dark"] .cities-dropdown {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .city-item {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .city-item:hover,
[data-theme="dark"] .city-item.highlighted {
    background-color: #4a5568;
}

[data-theme="dark"] .city-name {
    color: #e2e8f0;
}

[data-theme="dark"] .city-details {
    color: #a0aec0;
}

[data-theme="dark"] .city-zip {
    color: #63b3ed;
}

[data-theme="dark"] .city-state {
    color: #a0aec0;
}

[data-theme="dark"] .city-country {
    color: #718096;
}