/* WHV-Chat Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, 
        #2c5aa0 0%,
        #4a90c2 25%,
        #1a4c80 50%,
        #0d2818 100%
    );
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Realistische Meereswellen */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 1000"><defs><linearGradient id="wave1" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%23ffffff;stop-opacity:0.15"/><stop offset="100%" style="stop-color:%23ffffff;stop-opacity:0.05"/></linearGradient><linearGradient id="wave2" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:%23ffffff;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%23ffffff;stop-opacity:0.03"/></linearGradient></defs><path d="M0,400 Q200,350 400,400 T800,400 T1200,400 T1600,400 T2000,400 L2000,1000 L0,1000 Z" fill="url(%23wave1)"/><path d="M0,500 Q300,450 600,500 T1200,500 T1800,500 T2400,500 L2400,1000 L0,1000 Z" fill="url(%23wave2)"/><path d="M0,600 Q250,550 500,600 T1000,600 T1500,600 T2000,600 L2000,1000 L0,1000 Z" fill="url(%23wave1)" opacity="0.6"/></svg>') repeat-x;
    animation: waves 25s linear infinite;
    pointer-events: none;
    z-index: -2;
}

/* Schaumkronen auf den Wellen */
body::after {
    content: '';
    position: fixed;
    top: 40%;
    left: 0;
    width: 150%;
    height: 60%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1500 600"><circle cx="200" cy="300" r="3" fill="%23ffffff" opacity="0.4"/><circle cx="450" cy="280" r="2" fill="%23ffffff" opacity="0.3"/><circle cx="700" cy="320" r="4" fill="%23ffffff" opacity="0.5"/><circle cx="950" cy="290" r="2" fill="%23ffffff" opacity="0.3"/><circle cx="1200" cy="310" r="3" fill="%23ffffff" opacity="0.4"/><ellipse cx="300" cy="350" rx="8" ry="2" fill="%23ffffff" opacity="0.2"/><ellipse cx="800" cy="330" rx="6" ry="2" fill="%23ffffff" opacity="0.25"/></svg>') repeat-x;
    animation: foam 30s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes waves {
    0% { transform: translateX(0); }
    100% { transform: translateX(-200px); }
}

@keyframes foam {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(200px); }
}

.container {
    width: 95%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 50px;
}

.header {
    background: linear-gradient(135deg, #1a4c80 0%, #2c5aa0 50%, #4a90c2 100%);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Kaiser Wilhelm-Brücke (detaillierte Silhouette) */
.header::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 80px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 80"><g fill="%23ffffff" opacity="0.3"><rect x="100" y="60" width="700" height="20" rx="2"/><rect x="200" y="50" width="8" height="30"/><rect x="300" y="45" width="8" height="35"/><rect x="400" y="40" width="8" height="40"/><rect x="500" y="35" width="8" height="45"/><rect x="600" y="40" width="8" height="40"/><rect x="700" y="45" width="8" height="35"/><rect x="800" y="50" width="8" height="30"/><path d="M200,50 L220,30 L240,50 M300,45 L320,25 L340,45 M400,40 L420,20 L440,40 M500,35 L520,15 L540,35 M600,40 L620,20 L640,40 M700,45 L720,25 L740,45 M800,50 L820,30 L840,50" stroke="%23ffffff" stroke-width="2" fill="none" opacity="0.4"/><circle cx="210" cy="30" r="3" fill="%23ffffff" opacity="0.5"/><circle cx="310" cy="25" r="3" fill="%23ffffff" opacity="0.5"/><circle cx="410" cy="20" r="3" fill="%23ffffff" opacity="0.5"/><circle cx="510" cy="15" r="3" fill="%23ffffff" opacity="0.5"/><circle cx="610" cy="20" r="3" fill="%23ffffff" opacity="0.5"/><circle cx="710" cy="25" r="3" fill="%23ffffff" opacity="0.5"/><circle cx="810" cy="30" r="3" fill="%23ffffff" opacity="0.5"/><rect x="450" y="10" width="12" height="8" rx="2" fill="%23ffffff" opacity="0.4"/><rect x="430" y="25" width="60" height="4" rx="2" fill="%23ffffff" opacity="0.3"/></g></svg>') no-repeat center;
    background-size: contain;
    z-index: 1;
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.anchor-logo {
    width: 40px;
    height: 40px;
    fill: white;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

.header p {
    opacity: 0.9;
    font-size: 1rem;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.logout-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    z-index: 3;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.auth-container {
    padding: 40px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    color: #6c757d;
}

.auth-tab.active {
    background: #2c5aa0;
    color: white;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.btn {
    width: 100%;
    padding: 12px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: #1a4c80;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.captcha-group {
    border: 2px solid #e3f2fd;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 20px;
}

.captcha-group label {
    font-weight: 600;
    color: #1565c0;
    margin-bottom: 10px;
}

.captcha-group input[type="number"] {
    width: 80px;
    display: inline-block;
    margin-right: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

.captcha-refresh {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.captcha-refresh:hover {
    background: #e0e0e0;
}

.demo-info {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #90caf9;
    text-align: left;
}

.demo-info h4 {
    color: #1565c0;
    margin-bottom: 10px;
    font-size: 14px;
}

.demo-info p {
    color: #1976d2;
    font-size: 12px;
    margin: 0;
}

.chat-container {
    display: none;
    height: 600px;
    flex-direction: column;
}

.chat-container.active {
    display: flex;
}

.chat-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
}

.online-users {
    display: flex;
    align-items: center;
    gap: 10px;
}

.online-count {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.chat-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.users-sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    padding: 20px;
    overflow-y: auto;
}

.users-sidebar h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e9ecef;
    font-size: 14px;
}

.user-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    margin-right: 8px;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
}

.message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 70%;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease-in;
    font-size: 14px;
    line-height: 1.4;
}

.message.own {
    background: #2c5aa0;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.other {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 4px;
    color: #495057;
}

.message-author {
    font-weight: 600;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 5px;
}

.message-input {
    display: flex;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    gap: 10px;
}

.message-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.message-input input:focus {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.send-btn {
    padding: 10px 20px;
    background: #2c5aa0;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s;
}

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

.send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
}

.success {
    color: #28a745;
    font-size: 14px;
    margin-top: 10px;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 5px;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cookie-Hinweis */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    backdrop-filter: blur(10px);
}

.cookie-notice.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-accept,
.cookie-decline {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.cookie-accept {
    background: #28a745;
    color: white;
}

.cookie-accept:hover {
    background: #218838;
}

.cookie-decline {
    background: #6c757d;
    color: white;
}

.cookie-decline:hover {
    background: #5a6268;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 76, 128, 0.95);
    color: white;
    padding: 10px 0;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #90caf9;
}

.footer-links span {
    opacity: 0.5;
}

/* Hide footer when cookie notice is shown */
.cookie-notice.show ~ .footer {
    display: none;
}

/* Scrollbar Styling */
.messages::-webkit-scrollbar,
.users-sidebar::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-track,
.users-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages::-webkit-scrollbar-thumb,
.users-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover,
.users-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .users-sidebar {
        display: none;
    }
    
    .container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-width: none;
        margin-bottom: 80px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        gap: 10px;
    }
    
    .anchor-logo {
        width: 30px;
        height: 30px;
    }
    
    .logout-btn {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .auth-container {
        padding: 20px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .message-input {
        padding: 10px 15px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .auth-container {
        padding: 15px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .container {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255,255,255,0.1);
    }
    
    .auth-container {
        color: #e0e0e0;
    }
    
    .form-group label {
        color: #e0e0e0;
    }
    
    .auth-tabs {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .auth-tab {
        color: #b0b0b0;
    }
    
    .demo-info {
        background: #1a2332;
        border-color: #2d4a6b;
    }
    
    .demo-info h4 {
        color: #64b5f6;
    }
    
    .demo-info p {
        color: #90caf9;
    }
}