:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #c7d2fe;
    --secondary: #f472b6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --darker: #0f172a;
    --darkest: #020617;
    --light: #f8fafc;
    --lighter: #f1f5f9;
    --gray: #94a3b8;
    --gray-light: #e2e8f0;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --editor-bg: #1e1e2e;
    --editor-line: #2a2a3a;
    --editor-text: #e2e8f0;
}

[data-theme="dark"] {
    --bg-color: var(--darkest);
    --text-color: var(--light);
    --card-bg: rgba(15, 23, 42, 0.8);
    --card-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(2, 6, 23, 0.5);
    --editor-bg: #1e1e2e;
    --editor-line: #2a2a3a;
    --editor-text: #e2e8f0;
}

[data-theme="light"] {
    --bg-color: var(--lighter);
    --text-color: var(--darker);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: var(--gray-light);
    --input-bg: white;
    --editor-bg: #f8fafc;
    --editor-line: #e2e8f0;
    --editor-text: #1e293b;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
}


/* Background Elements */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 15s infinite ease-in-out;
}

.gradient-circle.circle-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
    top: -300px;
    left: -300px;
}

.gradient-circle.circle-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    bottom: -400px;
    right: -400px;
    animation-delay: 5s;
}

.gradient-circle.circle-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--warning), transparent 70%);
    top: 50%;
    left: 30%;
    animation-delay: 7s;
}

/* Room Container */
.room-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    z-index: 100;
    height: 60px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.5rem;
}

.room-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--input-bg);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    border: 1px solid var(--card-border);
}

.room-id-label {
    color: var(--gray);
    font-weight: 400;
}

.room-id {
    font-weight: 600;
    font-family: monospace;
}

.room-actions {
    display: flex;
    gap: 0.5rem;
}

.editor-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.font-size-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.theme-selector select {
    background: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.theme-selector select:focus {
    outline: none;
    border-color: var(--primary);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--warning);
}

.status-dot.connected {
    background-color: var(--success);
    animation: pulse 2s infinite;
}

.status-dot.disconnected {
    background-color: var(--danger);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
}

.secondary-btn:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.danger-btn:hover {
    background-color: #dc2626;
}

.icon-btn {
    transition: all 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.1);
    background-color: var(--glass);
    color: var(--primary);
}

.primary-btn {
    background-color: var(--primary);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.secondary-btn:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.danger-btn {
    background-color: var(--danger);
    color: white;
}

.danger-btn:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--glass);
    color: var(--primary);
}

/* Room Content */
.room-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Editor Section */
.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    position: relative;
    transition: all 0.3s ease;
}

.editor-container {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--editor-bg);
    border-radius: 0.5rem;
    margin: 0.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    width: 320px;
    background: var(--card-bg);
    border-left: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    z-index: 90;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    transform: translateX(0);
}

.participants-sidebar {
    right: 0;
}

.chat-sidebar {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.sidebar-title i {
    color: var(--primary);
}

.badge {
    background-color: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Participants Sidebar */
.sidebar-search {
    padding: 0.75rem 1rem;
    position: relative;
    border-bottom: 1px solid var(--card-border);
}

.sidebar-search i {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.sidebar-search input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 2rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--gray);
    padding: 2rem;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    opacity: 0.7;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.participant-item:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
    position: relative;
    flex-shrink: 0;
}

.participant-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    background-color: var(--gray);
}

.participant-status.online {
    background-color: var(--success);
}

.participant-info {
    flex: 1;
    min-width: 0;
}

.participant-name {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-role {
    font-size: 0.75rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.participant-role.admin {
    color: var(--primary);
}

.participant-you {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Chat Sidebar */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--gray);
    padding: 2rem;
}

.welcome-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.welcome-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.chat-welcome h4 {
    margin: 0.5rem 0;
    font-weight: 600;
    color: var(--text-color);
}

.chat-welcome p {
    margin: 0;
    font-size: 0.875rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    position: relative;
    
}

.chat-message.you {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 100%;
}

.chat-message.you .chat-message-content {
    align-items: flex-end;
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-message-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.chat-message-time {
    font-size: 0.75rem;
    color: var(--gray);
}

.chat-message-text {
    background-color: var(--input-bg);
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
    position: relative;
}

.chat-message.you .chat-message-text {
    background-color: var(--primary);
    color: white;
    border-top-right-radius: 0;
}

.chat-message.others .chat-message-text {
    border-top-left-radius: 0;
}

.chat-message-reactions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.chat-message-reaction {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-message-reaction:hover {
    background: var(--glass);
}

.chat-message-reaction.you-reacted {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.system-message {
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray);
    margin: 0.5rem 0;
    padding: 0.5rem;
    background-color: rgba(99, 102, 241, 0.05);
    border-radius: 0.5rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--card-border);
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Message Notification */
.message-notification {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    width: 300px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.message-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
}

.notification-name {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 0.75rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-close {
    margin-left: auto;
    padding: 0.25rem;
}

/* Monaco Editor Customization */
.monaco-editor {
    --vscode-editor-background: var(--editor-bg) !important;
    --vscode-editor-foreground: var(--editor-text) !important;
    --vscode-editor-lineHighlightBackground: var(--editor-line) !important;
    height: 100% !important;
}

.monaco-editor .margin {
    background-color: var(--editor-bg) !important;
}

.monaco-editor .view-overlays .current-line {
    background-color: var(--editor-line) !important;
    border: none !important;
}

.monaco-editor .cursors-layer .cursor {
    background-color: var(--primary) !important;
    border-left: 2px solid var(--primary) !important;
}

.monaco-editor .line-numbers {
    color: var(--gray) !important;
}

/* Theme-specific editor styles */
.monaco-editor.vs-dark .view-overlays .current-line {
    background-color: #2a2a3a !important;
}

.monaco-editor.hc-black .view-overlays .current-line {
    background-color: #1a1a1a !important;
}

.monaco-editor.monokai {
    --vscode-editor-background: #272822 !important;
    --vscode-editor-foreground: #f8f8f2 !important;
}

.monaco-editor.dracula {
    --vscode-editor-background: #282a36 !important;
    --vscode-editor-foreground: #f8f8f2 !important;
}

.monaco-editor.one-dark-pro {
    --vscode-editor-background: #282c34 !important;
    --vscode-editor-foreground: #abb2bf !important;
}

.monaco-editor.solarized-dark {
    --vscode-editor-background: #002b36 !important;
    --vscode-editor-foreground: #93a1a1 !important;
}

.monaco-editor.github-dark {
    --vscode-editor-background: #0d1117 !important;
    --vscode-editor-foreground: #c9d1d9 !important;
}

/* Hide minimap */
.monaco-editor .minimap {
    display: none !important;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

#qrCode {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.share-actions {
    display: flex;
    gap: 0.5rem;
}

#roomLinkInput {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 0.875rem;
}

/* Add this to your existing CSS */
.monaco-editor .scroll-decoration {
    box-shadow: none !important;
}

.monaco-editor .lines-content {
    padding-left: 10px !important;
}

.monaco-editor .margin {
    background-color: var(--editor-bg) !important;
    width: 50px !important;
    border-right: 1px solid var(--card-border);
}

.monaco-editor .line-numbers {
    color: var(--gray) !important;
    padding-left: 10px !important;
}

.monaco-editor .cursors-layer {
    z-index: 100 !important;
}

.monaco-editor .view-lines {
    cursor: text !important;
}

/* Improved scrollbar styling */
.monaco-editor .scrollbar.vertical {
    width: 10px !important;
}

.monaco-editor .scrollbar.vertical .slider {
    background: var(--primary) !important;
    opacity: 0.3;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.monaco-editor .scrollbar.vertical:hover .slider {
    opacity: 0.6;
}

/* Left sidebar scrollbar */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--card-bg);
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--card-bg);
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 4px;
    border: 2px solid var(--card-bg);
}

/* Editor container adjustments */
.editor-container {
    margin: 0;
    border-radius: 0;
}
/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .room-header {
        padding: 0.75rem 1rem;
    }
    
    .header-left, .header-right {
        gap: 0.5rem;
    }
    
    .room-info {
        padding: 0.5rem;
    }
    
    .sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .btn span {
        display: none;
    }
    
    .btn i {
        margin: 0;
    }
    
    .editor-controls {
        display: none;
    }
}
/* Add this to your existing CSS */
.monaco-editor .squiggly-error,
.monaco-editor .squiggly-warning,
.monaco-editor .squiggly-info,
.monaco-editor .squiggly-hint {
    display: none !important;
    background: none !important;
    border-bottom: none !important;
}

.monaco-editor .view-overlays .current-line {
    border: none !important;
}

.monaco-editor .decorationsOverviewRuler {
    display: none !important;
}

.monaco-editor .scroll-decoration {
    display: none !important;
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}

.loader-spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #6366f1;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}