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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    position: relative;
}

.language-switch-top {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 10px;
}

.language-switch-top a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.language-switch-top a:hover,
.language-switch-top a.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.language-switch-top .flag {
    font-size: 1.1em;
}

.language-switch {
    margin-top: 20px;
}

.language-switch a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    padding: 5px 15px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.language-switch a:hover,
.language-switch a.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.flag {
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 5px;
    background-size: cover;
    vertical-align: middle;
}

.flag-de {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjUiIGZpbGw9IiMwMDAwMDAiLz4KPHJlY3QgeT0iNSIgd2lkdGg9IjIwIiBoZWlnaHQ9IjUiIGZpbGw9IiNERDAwMDAiLz4KPHJlY3QgeT0iMTAiIHdpZHRoPSIyMCIgaG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margin-bottom: 10px;
    margin-top: 40px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.form-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.form-container h2 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    font-size: 1.8em;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.submit-btn,
.primary-btn,
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.submit-btn:hover,
.primary-btn:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.secondary-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.success-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.success-icon {
    font-size: 4em;
    color: #28a745;
    margin-bottom: 20px;
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-container h2 {
    color: #28a745;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.password-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.password {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #856404;
}

.link-container {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.link-container input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
}

.copy-btn {
    padding: 12px 20px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.copy-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.info-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.info-box p {
    margin-bottom: 10px;
}

.redirect-info {
    margin: 30px 0;
}

.countdown {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons .primary-btn {
    order: 1;
}

.action-buttons .secondary-btn {
    order: 2;
}

/* Single button centering when new dropin button is hidden */
.action-buttons:has(.primary-btn:only-child) {
    justify-content: center;
}

.captcha-box {
    text-align: center;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.captcha-question {
    font-size: 2em;
    font-weight: bold;
    margin: 20px 0;
    color: #333;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: inline-block;
    min-width: 150px;
}

.captcha-box input {
    max-width: 200px;
    margin: 20px auto;
    display: block;
    text-align: center;
    font-size: 1.2em;
}

.captcha-box button {
    margin-top: 20px;
}

.captcha-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.captcha-buttons .submit-btn,
.captcha-buttons .secondary-btn {
    min-width: 140px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.captcha-buttons .submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.captcha-buttons .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.captcha-buttons .secondary-btn {
    background: #6c757d;
    color: white;
}

.captcha-buttons .secondary-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container,
    .success-container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons .primary-btn,
    .action-buttons .secondary-btn {
        margin: 5px 0;
        display: block;
    }
    
    .captcha-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .captcha-buttons .submit-btn,
    .captcha-buttons .secondary-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header,
    .language-switch,
    .action-buttons {
        display: none;
    }
    
    .form-container,
    .success-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Footer Links Styling - Positioned like language buttons within container */
.footer-links {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    gap: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.footer-links a:hover,
.footer-links a.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

/* Container needs bottom padding for footer links */
.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 60px; /* Space for footer links */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .container {
        padding-bottom: 100px; /* More space on mobile */
    }
    
    .footer-links {
        bottom: 20px;
        right: 0;
        gap: 8px;
    }
    
    .footer-links a {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* Very small screens - stack vertically */
@media (max-width: 480px) {
    .footer-links {
        bottom: 20px;
        right: 0;
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .footer-links a {
        padding: 6px 10px;
        font-size: 0.75em;
    }
    
    .container {
        padding-bottom: 120px; /* More space for stacked buttons */
    }
}