/* --- Omegle Color Palette --- */
:root {
    --color-header: #06968B; /* Classic Omegle Blue/Green */
    --color-background: #ffffff; /* White background */
    --color-card-bg: #f5f5f5; /* Light gray for cards/sections */
    --color-border: #999;
    --color-primary-text: #333;
    --color-message-you: #06968B; /* Blue for 'You' messages */
    --color-message-stranger: #F50000; /* Red for 'Stranger' messages */
    --color-system-msg: #888;
}

.info-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: linear-gradient(135deg, #06968B 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.info-card h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #06968B, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-card p {
    color: #555;
    line-height: 1.7;
    font-size: 16px;
    margin-bottom: 15px;
}

.info-card ol {
    padding-left: 25px;
    margin-bottom: 25px;
}

.info-card ol li {
    color: #666;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
    position: relative;
}

.info-card ol li::marker {
    color: #667eea;
    font-weight: bold;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .info-section {
        padding: 30px 15px;
        margin: 20px 10px;
    }
    
    .info-card {
        padding: 25px 20px;
    }
    
    .info-card h2 {
        font-size: 24px;
    }
}


body {
    font-family: Arial, sans-serif;
    background-color: var(--color-background);
    color: var(--color-primary-text);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: var(--color-background);
    padding: 0;
    width: 100%;
    max-width: 1200px;
}

/* --- Header --- */
#app-header {
    background: var(--color-header);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-text {
    font-size: 1.8em;
    font-weight: bold;
    color: white;
}

.home-btn {
    background: none;
    border: 1px solid white;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.home-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Landing View --- */
#landing-view {
    padding: 50px 20px;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.hero-section p {
    color: var(--color-system-msg);
    margin-bottom: 30px;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
}

.mode-btn {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.text-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.video-btn {
    background-color: var(--color-header);
    color: white;
}

/* NEW GROUP CHAT BUTTON STYLE */
.group-btn {
    background-color: #f59e0b; /* Yellow/Orange */
    color: white;
}
/* END NEW GROUP CHAT BUTTON STYLE */

.mode-btn:hover {
    opacity: 0.9;
}

/* Info Cards */
.info-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: var(--color-card-bg);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 450px;
    text-align: left;
}

.info-card h2 {
    color: var(--color-header);
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.info-card ol, .info-card p {
    color: var(--color-system-msg);
}

/* --- Chat Interface --- */

#chat-view {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.status-msg {
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    color: var(--color-system-msg);
}

.video-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.video-box {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    position: relative;
}

.video-box video {
    width: 100%;
    min-height: 250px;
    background-color: #eee;
    display: block;
    border-radius: 4px;
}

.label {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}

.stranger-label {
    background-color: var(--color-message-stranger); /* Red */
}

.local-label {
    background-color: var(--color-message-you); /* Blue/Cyan */
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #eee;
    color: var(--color-border);
}

.video-placeholder .icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.video-box.has-stream .video-placeholder {
    display: none;
}

/* --- Chat and Controls --- */

.chat-and-controls {
    display: flex;
    flex-direction: row;
    margin-top: 20px;
    gap: 20px;
}

.chat-container {
    flex-grow: 1;
}

.chat-box {
    height: 150px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    padding: 10px;
    border-radius: 4px;
    background-color: var(--color-background);
    margin-bottom: 10px;
    color: var(--color-primary-text);
}

.chat-box p {
    margin: 3px 0;
    font-size: 0.95em;
    word-wrap: break-word;
}

.chat-box .self {
    color: var(--color-message-you);
}

.chat-box .partner {
    color: var(--color-message-stranger);
}

.chat-box .system {
    color: var(--color-system-msg);
    font-style: italic;
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background-color: var(--color-card-bg);
    color: var(--color-primary-text);
}

.send-btn {
    padding: 10px 20px;
    background-color: var(--color-header);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.control-panel {
    display: flex;
    flex-direction: column;
    width: 140px;
    gap: 10px;
}

.control-btn {
    padding: 12px 10px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.primary-btn {
    background-color: #16a34a; /* Green: Start */
    color: white;
}

.danger-btn {
    background-color: #dc2626; /* Red: Stop */
    color: white;
}

.accent-btn {
    background-color: #007bff; /* Blue: New/Skip */
    color: white;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-grid-container {
        grid-template-columns: 1fr;
    }
    .chat-and-controls {
        flex-direction: column;
        gap: 10px;
    }
    .control-panel {
        flex-direction: row;
        width: 100%;
        order: -1; /* Move controls above chat on mobile */
    }
    .control-panel .control-btn {
        flex-grow: 1;
    }
    #chat-view {
        padding: 10px;
    }
    .chat-box {
        height: 200px;
    }
}