* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    min-height: 100vh;
}

header {
    grid-column: 1 / -1;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
}

.status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.status.connected {
    background: #4CAF50;
    color: white;
}

.status.connecting {
    background: #FF9800;
    color: white;
    animation: pulse 2s infinite;
}

.status.disconnected {
    background: #F44336;
    color: white;
}

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

.chat-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.encryption-info {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.encryption-info h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.security-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
}

.label {
    font-weight: bold;
}

.value {
    font-family: 'Courier New', monospace;
}

.quantum-safe {
    color: #90EE90 !important;
    font-weight: bold;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    animation: slideIn 0.3s ease-out;
}

.message.sent {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.received {
    background: #e3f2fd;
    color: #333;
    margin-right: auto;
}

.system-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 10px;
    background: #fff3cd;
    border-radius: 10px;
    margin-bottom: 15px;
}

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

.security-info-message {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #bee5eb;
}

.security-info-message h4 {
    margin-bottom: 10px;
    color: #0c5460;
}

.security-info-message ul {
    list-style: none;
    padding: 0;
}

.security-info-message li {
    margin-bottom: 5px;
    padding: 5px 0;
}

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

.input-area {
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#messageInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#messageInput:disabled {
    background: #f8f9fa;
    color: #6c757d;
}

#sendButton {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#sendButton:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#sendButton:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.info-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    height: fit-content;
}

.info-panel h3 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.4em;
}

.info-panel ul {
    list-style: none;
}

.info-panel li {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

.info-panel li:hover {
    transform: translateX(5px);
}

.info-panel strong {
    color: #764ba2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .chat-container {
        height: 500px;
    }
    
    .security-details {
        grid-template-columns: 1fr;
    }
}