/* ==========================================================================
   EXCODE HTML Viewer - Pure Static Web App Styles
   Left: HTML, CSS, Script (Customizable via Checkboxes) | Right: Live Preview
   ========================================================================== */

:root {
  --bg-app: #0d1117;
  --bg-header: #161b22;
  --bg-panel-header: #161b22;
  --bg-panel: #0d1117;
  --bg-modal: #161b22;
  --bg-modal-backdrop: rgba(0, 0, 0, 0.75);
  
  --border-color: #30363d;
  --border-subtle: #21262d;
  
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  
  --brand-cyan: #00D2F7;
  --brand-primary: #0097B1;
  --brand-hover: #00b4d4;
  --brand-active: #007a8f;
  
  --accent-green: #3fb950;
  --accent-amber: #d29922;
  --accent-red: #f85149;
  --accent-js: #f1e05a;
  
  --btn-bg: #21262d;
  --btn-border: #30363d;
  --btn-hover: #30363d;
  --btn-text: #c9d1d9;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, Monaco, "Courier New", monospace;
  
  --header-height: 52px;
  --panel-header-height: 36px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input {
  font-family: inherit;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.app-header {
  height: var(--header-height);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  user-select: none;
  z-index: 10;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 28px;
  height: 28px;
}

.brand-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.brand-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-cyan);
  background: rgba(0, 210, 247, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
}

.header-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border-color);
}

.project-title-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unsaved-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-cyan);
  display: inline-block;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.unsaved-dot.visible {
  opacity: 1;
}

/* Header Center: Checkbox Panel Toggles */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0d1117;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.toggle-item:hover {
  background-color: #21262d;
}

.toggle-item input[type="checkbox"] {
  accent-color: var(--brand-primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.toggle-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid var(--btn-border);
  background-color: var(--btn-bg);
  color: var(--btn-text);
  outline: none;
}

.btn:hover {
  background-color: var(--btn-hover);
  color: var(--text-main);
  border-color: #484f58;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #ffffff;
}

.btn-icon-only {
  padding: 6px 8px;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-danger {
  background-color: rgba(248, 81, 73, 0.1);
  border-color: rgba(248, 81, 73, 0.3);
  color: #f85149;
}

.btn-danger:hover {
  background-color: #f85149;
  border-color: #f85149;
  color: #ffffff;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ==========================================================================
   2-COLUMN WORKSPACE (50:50)
   ========================================================================== */

.workspace {
  display: flex;
  height: calc(100vh - var(--header-height));
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* LEFT COLUMN: EDITORS (HTML, CSS, SCRIPT STACKED VERTICALLY) */
.pane-left {
  width: 50%;
  min-width: 250px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
  position: relative;
  overflow: hidden;
}

.editor-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: height 0.05s ease;
}

/* RIGHT COLUMN: PREVIEW */
.pane-right {
  flex: 1;
  min-width: 250px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
}

/* Panel Header */
.pane-header {
  height: var(--panel-header-height);
  min-height: var(--panel-header-height);
  background-color: var(--bg-panel-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  user-select: none;
}

.pane-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 4px;
}

.label-html, .badge-html {
  color: var(--brand-cyan);
  background: rgba(0, 210, 247, 0.12);
}

.label-css, .badge-css {
  color: #a371f7;
  background: rgba(163, 113, 247, 0.12);
}

.label-js, .badge-js {
  color: #f1e05a;
  background: rgba(241, 224, 90, 0.15);
}

.label-preview {
  color: #3fb950;
  background: rgba(63, 185, 80, 0.12);
}

/* Vertical Splitter (Between Left & Right) */
.splitter-v {
  width: 6px;
  background-color: var(--bg-app);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  cursor: col-resize;
  position: relative;
  user-select: none;
  transition: background-color 0.15s ease;
  z-index: 5;
}

.splitter-v:hover, .splitter-v.active {
  background-color: var(--brand-primary);
  border-color: var(--brand-cyan);
}

.splitter-v-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 24px;
  border-radius: 1px;
  background-color: var(--border-color);
}

/* Horizontal Splitters (Between HTML, CSS, JS) */
.splitter-h {
  height: 6px;
  background-color: var(--bg-app);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  cursor: row-resize;
  position: relative;
  user-select: none;
  transition: background-color 0.15s ease;
  z-index: 4;
}

.splitter-h:hover, .splitter-h.active {
  background-color: var(--brand-primary);
  border-color: var(--brand-cyan);
}

.splitter-h-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background-color: var(--border-color);
}

/* ==========================================================================
   CODEMIRROR EDITOR
   ========================================================================== */

.editor-container {
  flex: 1;
  height: calc(100% - var(--panel-header-height));
  position: relative;
  overflow: hidden;
}

.CodeMirror {
  height: 100% !important;
  width: 100% !important;
  font-family: var(--font-mono) !important;
  font-size: 14.5px !important;
  line-height: 1.6 !important;
  background-color: #0d1117 !important;
  color: #e6edf3 !important;
}

.CodeMirror-gutters {
  background-color: #161b22 !important;
  border-right: 1px solid var(--border-subtle) !important;
  padding: 0 4px 0 0 !important;
}

.CodeMirror-linenumber {
  color: #484f58 !important;
  padding: 0 8px 0 6px !important;
  font-size: 12px !important;
}

.CodeMirror-cursor {
  border-left: 2px solid var(--brand-cyan) !important;
}

.CodeMirror-selected {
  background: rgba(0, 151, 177, 0.25) !important;
}

.CodeMirror-focused .CodeMirror-selected {
  background: rgba(0, 151, 177, 0.35) !important;
}

.CodeMirror-activeline-background {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* Syntax Highlighting */
.cm-tag { color: #7ee787 !important; font-weight: 500; }
.cm-attribute { color: #79c0ff !important; }
.cm-string { color: #a5d6ff !important; }
.cm-comment { color: #8b949e !important; font-style: italic; }
.cm-keyword { color: #ff7b72 !important; font-weight: 500; }
.cm-property { color: #d2a8ff !important; }
.cm-def { color: #ffa657 !important; }
.cm-atom { color: #79c0ff !important; }
.cm-number { color: #79c0ff !important; }
.cm-variable { color: #e6edf3 !important; }
.cm-variable-2 { color: #ffa657 !important; }
.cm-operator { color: #ff7b72 !important; }
.cm-meta { color: #79c0ff !important; }

/* ==========================================================================
   PREVIEW CONTAINER & IFRAME
   ========================================================================== */

.preview-container {
  flex: 1;
  height: calc(100% - var(--panel-header-height));
  position: relative;
  background-color: #ffffff;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #ffffff;
  display: block;
}

/* ==========================================================================
   FULLSCREEN PREVIEW OVERLAY
   ========================================================================== */

.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 1000;
  display: none;
  flex-direction: column;
}

.fullscreen-overlay.active {
  display: flex;
}

.fullscreen-header {
  height: 42px;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.fullscreen-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.fullscreen-iframe-container {
  flex: 1;
  width: 100%;
  height: calc(100% - 42px);
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-modal-backdrop);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 16px;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background-color: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  padding: 12px 20px;
  background-color: #12161c;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background-color: #1c2128;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast.toast-success {
  border-color: rgba(63, 185, 80, 0.4);
}

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

.toast.toast-error {
  border-color: rgba(248, 81, 73, 0.4);
}

.toast.toast-error svg {
  color: var(--accent-red);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   RESPONSIVE (MOBILE)
   ========================================================================== */

@media (max-width: 768px) {
  .app-header {
    padding: 0 10px;
    flex-wrap: wrap;
    height: auto;
    gap: 8px;
    padding-bottom: 8px;
  }
  
  .brand-badge {
    display: none;
  }
  
  .project-title-badge {
    max-width: 120px;
    font-size: 12px;
  }
  
  .header-center {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
  
  .btn-text {
    display: none;
  }
  
  .btn {
    padding: 6px 9px;
  }
  
  .workspace {
    flex-direction: column;
    height: calc(100vh - 90px);
  }
  
  .pane-left {
    width: 100% !important;
    height: 50% !important;
  }
  
  .pane-right {
    width: 100% !important;
    height: 50% !important;
  }
  
  .splitter-v {
    width: 100%;
    height: 6px;
    cursor: row-resize;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-left: none;
    border-right: none;
  }
  
  .splitter-v-handle {
    width: 24px;
    height: 2px;
  }
}

/* ==========================================================================
   UPLOAD BUTTON & MODAL
   ========================================================================== */

.btn-upload {
  background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
  border-color: #2ea043;
  color: #ffffff;
}

.btn-upload:hover {
  filter: brightness(1.1);
  border-color: #3fb950;
  color: #ffffff;
}

.modal-card-lg {
  max-width: 560px;
}

/* ==========================================================================
   FORM CONTROLS (MODAL INPUTS & SELECTS)
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--brand-cyan);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-text-action:hover {
  background-color: rgba(0, 210, 247, 0.1);
  color: #ffffff;
}

.btn-text-action.spinning svg {
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-label-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-main);
  background-color: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 3px rgba(0, 210, 247, 0.15);
}

.form-input::placeholder {
  color: var(--text-dim);
}

/* Select Styling */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b949e'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

select.form-input option {
  background-color: #161b22;
  color: var(--text-main);
  padding: 8px 12px;
}

/* Create Folder Section */
.create-folder-section {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.create-folder-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.create-folder-row .form-input {
  flex: 1;
}

.btn-create-folder {
  height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
  border: 1px solid #2ea043;
  color: #ffffff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-create-folder:hover {
  filter: brightness(1.1);
  border-color: #3fb950;
  color: #ffffff;
}

.btn-create-folder:active {
  transform: translateY(1px);
}

.btn-create-folder:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* Upload Tabs */
.upload-tabs {
  display: flex;
  gap: 4px;
  background-color: #0d1117;
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.upload-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.upload-tab:hover {
  color: var(--text-muted);
  background-color: #161b22;
}

.upload-tab.active {
  color: var(--text-main);
  background-color: #21262d;
}

/* Dropzone */
.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 16px;
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  background-color: #0d1117;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.upload-dropzone:hover {
  border-color: var(--brand-primary);
  background-color: rgba(0, 151, 177, 0.05);
}

.upload-dropzone.dragover {
  border-color: var(--brand-cyan);
  background-color: rgba(0, 210, 247, 0.08);
  box-shadow: 0 0 0 4px rgba(0, 210, 247, 0.1);
}

.dropzone-text {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

.dropzone-hint code {
  background-color: #21262d;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

/* Upload Result */
.upload-result {
  margin-top: 14px;
  padding: 14px;
  background-color: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.25);
  border-radius: 8px;
}

.result-success {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-green);
}

.result-url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #0d1117;
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: 6px;
}

.result-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-cyan);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Upload Progress */
.upload-progress {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background-color: #21262d;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-cyan));
  border-radius: 3px;
  transition: width 0.15s ease;
}

.progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Image Gallery */
.image-gallery-section {
  margin-top: 16px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background-color: #0d1117;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gallery-item:hover {
  border-color: var(--brand-primary);
  background-color: #161b22;
}

.gallery-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  background-color: #21262d;
}

.gallery-name {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  word-break: break-all;
  line-height: 1.2;
  max-height: 24px;
  overflow: hidden;
}

/* ==========================================================================
   STUDENT QR CODE & INFO CARD
   ========================================================================== */

.student-info-card {
  background-color: #161b22;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.student-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.student-info-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 151, 177, 0.2);
  color: var(--brand-cyan);
  padding: 2px 8px;
  border-radius: 4px;
}

.student-name-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.student-info-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.student-url-display {
  background-color: #0d1117;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.student-url-display code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-cyan);
  word-break: break-all;
}

.student-qr-area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background-color: #0d1117;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
  text-align: left;
}

.qr-code-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  box-sizing: border-box;
}

.qr-code-box canvas,
.qr-code-box img {
  display: block;
  width: 84px !important;
  height: 84px !important;
}

.qr-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
}

.qr-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.btn-download-qr {
  background: linear-gradient(135deg, #1f6feb 0%, #388bfd 100%);
  border-color: #388bfd;
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
}

.btn-download-qr:hover {
  filter: brightness(1.15);
  border-color: #58a6ff;
  color: #ffffff;
}

.btn-download-qr:active {
  transform: translateY(1px);
}
