/* public/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Adsterra Social Bar Styling */
.ad-bar {
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ad-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.social-ad-content .mock-ad {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 20px;
    font-size: 13px;
    color: #764ba2;
    font-weight: 500;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1rem;
    opacity: 0.9;
}

.safety-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    margin-top: 12px;
}

main {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.chat-panel {
    flex: 2;
    min-width: 280px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 70vh;
}

.status-area {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status.waiting {
    color: #ff9800;
}

.status.connected {
    color: #4caf50;
}

.status.disconnected {
    color: #f44336;
}

.status i {
    font-size: 0.7rem;
}

.typing-status {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fefefe;
}

.message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.you {
    align-self: flex-end;
    background: #667eea;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.stranger {
    align-self: flex-start;
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
}

.system-message {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    background: #f1f3f5;
    padding: 8px;
    border-radius: 20px;
    margin: 5px 0;
}

.input-area {
    display: flex;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    gap: 10px;
}

#message-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s;
}

#message-input:focus {
    border-color: #667eea;
}

#send-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#send-btn:hover:not(:disabled) {
    background: #5a67d8;
}

#send-btn:disabled, #message-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 12px;
    padding: 0 20px 20px 20px;
    background: white;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn.secondary {
    background: #f1f3f5;
    color: #555;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Adsterra Direct Links Area */
.ad-direct-links {
    flex: 1;
    min-width: 220px;
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.1);
    height: fit-content;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.direct-link {
    display: block;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
    border: 1px solid #e9ecef;
}

.direct-link:hover {
    background: #e9ecef;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
}

/* Scrollbar */
.messages::-webkit-scrollbar {
    width: 6px;
}

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

.messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

@media (max-width: 700px) {
    .app-container {
        padding: 15px;
    }
    .chat-panel {
        height: 60vh;
    }
    .message {
        max-width: 85%;
    }
}
