/* Grocery Picker Inspired Color Scheme */

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

:root {
    --primary-orange: #ff6b35;
    --primary-red: #e63946;
    --text-dark: #2d3748;
    --text-gray: #718096;
    --text-light: #a0aec0;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-sidebar: #fafafa;
    --border-light: #e2e8f0;
    --green: #38a169;
    --blue: #3182ce;
    --yellow: #f6ad55;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Page Wrapper */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.logo h1 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: var(--primary-orange);
}

.header-buttons {
    display: flex;
    gap: 12px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-text:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 900px;
    margin: 32px auto;
    padding: 0 24px;
    width: 100%;
}

.intro-box {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.intro-box h2 {
    color: var(--text-dark);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

.intro-box p {
    margin-bottom: 10px;
    color: var(--text-gray);
    font-size: 15px;
}

/* Chat Options */
.chat-options {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.option-section {
    margin-bottom: 24px;
}

.option-section:last-child {
    margin-bottom: 0;
}

.option-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-gray);
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-orange);
}

.btn-start {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

.btn-start:hover {
    background-color: #ff5722;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.input-interests {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
    color: var(--text-dark);
}

.input-interests:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.help-text {
    font-size: 13px;
    color: var(--text-light);
}

/* Info Section */
.info-section {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.info-section p {
    margin: 0;
    color: var(--text-dark);
    font-size: 14px;
}

/* Footer */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 40px;
}

.footer a {
    color: var(--primary-orange);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-simple {
    background-color: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 24px;
    font-weight: normal;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-dark);
}

.modal-content-simple h2 {
    margin-bottom: 24px;
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.input-field {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    color: var(--text-dark);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}

.btn-submit:hover {
    background-color: #ff5722;
    transform: translateY(-1px);
}

.modal-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
}

.modal-footer a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 3000;
    max-width: 320px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background-color: var(--green);
}

.toast-error {
    background-color: var(--primary-red);
}

.toast-info {
    background-color: var(--blue);
}

/* Chat Page */
.chat-page {
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.chat-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--primary-orange);
}

.chat-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-container {
    display: flex;
    height: calc(100vh - 56px);
    background-color: var(--bg-light);
}

.chat-sidebar {
    width: 280px;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border-light);
    padding: 20px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-white);
    margin: 12px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    background-color: #1a1a1a;
    height: 50%;
}

.video-wrapper {
    position: relative;
    background-color: #2a2a2a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.video-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.video-feed.active {
    display: block;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2a2a2a;
    color: white;
}

.video-placeholder.hidden {
    display: none;
}

.placeholder-content {
    text-align: center;
}

.placeholder-content h3 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
}

.placeholder-content p {
    color: #999;
    font-size: 13px;
}

.video-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.chat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-white);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: var(--bg-light);
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 80%;
    font-size: 14px;
}

.chat-message.system {
    background-color: #fffbeb;
    color: var(--text-gray);
    max-width: 100%;
    text-align: center;
    font-size: 13px;
    border: 1px solid #fde68a;
}

.chat-message.you {
    background-color: var(--primary-orange);
    color: white;
    margin-left: auto;
}

.chat-message.stranger {
    background-color: var(--bg-white);
    color: var(--text-dark);
    margin-right: auto;
    border: 1px solid var(--border-light);
}

.chat-input-container {
    display: flex;
    gap: 12px;
    padding: 16px;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-light);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    color: var(--text-dark);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.chat-input:disabled {
    background-color: var(--bg-light);
    cursor: not-allowed;
}

.btn-send {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover {
    background-color: #ff5722;
}

.btn-send:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #ff5722;
}

.btn-warning {
    background-color: var(--yellow);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-warning:hover {
    background-color: #ed8936;
}

.btn-danger {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-block {
    width: 100%;
    display: block;
    margin-bottom: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Responsive */
@media (max-width: 768px) {
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .chat-container {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        height: auto;
        max-height: 30%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    
    .video-container {
        grid-template-columns: 1fr;
        height: 40%;
    }
    
    .chat-main {
        margin: 8px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
