/* Global Styles */
body {
    font-family: "Roboto", sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    background-image: linear-gradient(-59deg, #d6efff, #e5f1f6);
    overflow: hidden;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    height: 80px;
    box-sizing: border-box;
}

.header-left {
    flex: 1;
}

.header-right {
    text-align: right;
}

h1 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

header p {
    margin: 5px 0 10px 0;
    color: #666;
    font-size: 12px;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    width: 100%;
    margin: 10px 0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007BFF, #0056b3);
    width: 0%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.duration {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 12px;
    color: #525458;
    background-color: #EFF9FF;
    padding: 6px 12px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Main Layout */
.main-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
}

/* Panel Styles */
.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.left-panel {
    flex: 0 0 40%;
    min-width: 300px;
}

.right-panel {
    flex: 1;
    min-width: 400px;
}

/* Resizable Sections */
.resizable-section {
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.resizable-section.collapsed .section-content {
    display: none;
}

.resizable-section.collapsed {
    flex: 0 0 auto;
}

/* Question and Answer Sections */
.question-section {
    flex: 1;
    min-height: 120px;
}

.answer-section {
    flex: 1;
    min-height: 120px;
}

.conversation-section {
    flex: 1;
    min-height: 120px;
}

.ide-section {
    flex: 1.5;
    min-height: 200px;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    user-select: none;
}

.section-header h3 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.section-header i {
    margin-right: 6px;
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

/* Collapse Button */
.collapse-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.collapse-btn.rotated i {
    transform: rotate(180deg);
}

/* Section Content */
.section-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.question-content, .answer-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.question-placeholder, .answer-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
}

.question-placeholder i, .answer-placeholder i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.clear-answer-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s ease;
}

.clear-answer-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.clear-answer-btn i {
    margin-right: 4px;
}

/* Answer Input Styles */
.answer-input-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.answer-textarea {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
    background: #fafafa;
    min-height: 80px;
}

.answer-textarea:focus {
    border-color: #007BFF;
    background: white;
}

.answer-textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

.answer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.answer-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #6c757d;
}

.submit-answer-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

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

.submit-answer-btn i {
    font-size: 10px;
}

/* Conversation Section */
.conversation-content {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: row-reverse;
    gap: 12px;
}

.participant-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid #007BFF;
    flex: 1;
    min-width: 0;
}

.participant-panel.candidate-panel {
    border-left-color: #28a745;
}

.participant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.avatar-container {
    position: relative;
}

.avatar-container img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.participant-info h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.status {
    display: inline-block;
    font-size: 10px;
    color: #666;
    background: #e9ecef;
    padding: 3px 6px;
    border-radius: 8px;
    margin-top: 3px;
}

.status.talking {
    background: #007BFF;
    color: white;
}

.status i {
    margin-right: 3px;
}

.message-content {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-left: 52px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    line-height: 1.4;
    max-height: 100px;
    overflow-y: auto;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* IDE Section */
.ide-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ide-title h3 {
    margin: 0;
    font-size: 14px;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
}

.language-selector select option {
    background: #667eea;
    color: white;
}

.ide-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ide-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
}

.ide-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ide-btn.primary {
    background: #28a745;
}

.ide-btn.primary:hover {
    background: #218838;
}

.ide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.editor-container {
    display: flex;
    flex: 1;
    min-height: 150px;
}

.editor-sidebar {
    width: 40px;
    background: #2d3748;
    border-right: 1px solid #4a5568;
    flex-shrink: 0;
}

.line-numbers {
    padding: 8px 4px;
    color: #a0aec0;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-align: right;
    user-select: none;
}

.editor-main {
    flex: 1;
    position: relative;
    min-width: 0;
}

.monaco-editor-container {
    width: 100%;
    height: 100%;
    min-height: 150px;
}

.fallback-editor {
    width: 100%;
    height: 100%;
    min-height: 150px;
    border: none;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #1e1e1e;
    color: #d4d4d4;
    resize: none;
    outline: none;
}

.ide-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 11px;
    flex-shrink: 0;
}

.status-bar {
    display: flex;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
}

.submission-status {
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.submission-status.success {
    background: #d4edda;
    color: #155724;
}

.submission-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* Resize Handles */
.resize-handle {
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 10;
}

.resize-handle:hover {
    background: #007BFF;
}

.resize-handle.vertical {
    width: 8px;
    cursor: ew-resize;
    flex-shrink: 0;
}

.resize-handle.horizontal {
    height: 8px;
    cursor: ns-resize;
    flex-shrink: 0;
}

.resize-handle.dragging {
    background: #007BFF;
}

.resize-indicator {
    color: #6c757d;
    font-size: 12px;
    opacity: 0.7;
    pointer-events: none;
}

.resize-handle:hover .resize-indicator {
    color: white;
    opacity: 1;
}

/* Sound Animation */
.sound-ogge-container {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 52px;
    margin-top: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sound-ogge-container.active {
    opacity: 1;
}

.sound-ogge-bar {
    width: 2px;
    height: 8px;
    background: #007BFF;
    border-radius: 1px;
    animation: sound-ogge 0.5s ease-in-out infinite alternate;
}

.candidate-panel .sound-ogge-bar {
    background: #28a745;
}

.sound-ogge-bar:nth-child(1) { animation-delay: 0.1s; }
.sound-ogge-bar:nth-child(2) { animation-delay: 0.2s; }
.sound-ogge-bar:nth-child(3) { animation-delay: 0.3s; }
.sound-ogge-bar:nth-child(4) { animation-delay: 0.4s; }
.sound-ogge-bar:nth-child(5) { animation-delay: 0.5s; }

@keyframes sound-ogge {
    0% { height: 3px; }
    100% { height: 12px; }
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    height: 60px;
    box-sizing: border-box;
}

.footer-left {
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

.footer-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mic-button {
    background: #007BFF;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.mic-button:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.mic-button.recording {
    background: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.footer_btns {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.footer_btns:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Question and Answer Display */
.question-display, .answer-display {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.question-title, .answer-title {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #007BFF;
    flex-shrink: 0;
}

.answer-title {
    border-left-color: #28a745;
}

.question-title h4, .answer-title h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 14px;
}

.question-text, .answer-code {
    flex: 1;
    overflow-y: auto;
}

.question-text pre, .answer-code pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.answer-code pre {
    background: #1e1e1e;
    color: #d4d4d4;
    border-color: #2d3748;
}

.question-reference {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.question-reference h5 {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 12px;
}

.question-reference pre {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
}

/* Interim text styling */
.interim-text {
    color: #6c757d;
    font-style: italic;
    opacity: 0.7;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

.error-text {
    color: #dc3545;
}

.success-text {
    color: #28a745;
}

.warning-text {
    color: #ffc107;
}

.info-text {
    color: #17a2b8;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .left-panel {
        flex: 0 0 35%;
    }
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }
    
    .left-panel, .right-panel {
        flex: 1;
        min-width: unset;
    }
    
    .resize-handle.vertical {
        display: none;
    }
    
    .resize-handle.horizontal {
        width: 100%;
        height: 8px;
    }
} 