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

html, body {
  background: #0a0a0a;
  color: #e0e0e0;
  font-family: "Courier New", monospace;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

/* --- Login Page --- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 100%);
}

.login-box {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 40px;
  width: 100%;
  max-width: 360px;
  margin: 0 16px;
  text-align: center;
}

.login-box h1 {
  color: #ff4444;
  font-size: 28px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.login-box .subtitle {
  color: #666;
  font-size: 12px;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.login-box input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #e0e0e0;
  font-family: "Courier New", monospace;
  font-size: 14px;
}

.login-box input:focus {
  outline: none;
  border-color: #ff4444;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

.login-box button {
  width: 100%;
  padding: 12px;
  background: #ff4444;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-family: "Courier New", monospace;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.login-box button:hover {
  background: #ff6666;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
}

.login-error {
  color: #ff4444;
  font-size: 12px;
  margin-bottom: 16px;
}

/* --- Main App --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #111;
  border-bottom: 1px solid #222;
  height: 48px;
  flex-shrink: 0;
}

.app-header .logo {
  color: #ff4444;
  font-size: 18px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header .username {
  color: #aaa;
  font-size: 13px;
}

.app-header .btn-logout {
  padding: 4px 12px;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  color: #aaa;
  font-family: "Courier New", monospace;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.app-header .btn-logout:hover {
  background: #333;
  color: #fff;
}

/* --- Main Content (screen + file panel) --- */
.main-content {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

/* --- DOSBox Screen --- */
.screen-container {
  flex: 1;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

/* --- File Panel --- */
.file-panel {
  width: 0;
  overflow: hidden;
  background: #111;
  border-left: 1px solid #222;
  display: flex;
  flex-direction: column;
  transition: width 0.2s;
  flex-shrink: 0;
}

.file-panel.open {
  width: 280px;
}

.file-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}

.file-panel-header select {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #e0e0e0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 4px 8px;
  flex: 1;
  margin-right: 8px;
}

.file-path {
  padding: 4px 8px;
  font-size: 11px;
  color: #888;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.file-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.file-entry {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  border-bottom: 1px solid #1a1a1a;
  gap: 6px;
}

.file-entry:hover {
  background: #1a1a1a;
}

.file-dir .file-name {
  cursor: pointer;
  color: #44aaff;
}

.file-dir .file-name:hover {
  text-decoration: underline;
}

.file-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ccc;
}

.file-size {
  color: #666;
  font-size: 10px;
  flex-shrink: 0;
}

.file-floppy {
  background: none;
  border: none;
  color: #4488ff;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  flex-shrink: 0;
}

.file-floppy:hover {
  color: #66aaff;
}

.file-delete {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 10px;
  padding: 2px 4px;
  flex-shrink: 0;
}

.file-delete:hover {
  color: #ff4444;
}

.file-empty {
  padding: 16px 8px;
  color: #444;
  font-size: 12px;
  text-align: center;
}

.file-dropzone {
  padding: 16px 8px;
  margin: 8px;
  border: 2px dashed #333;
  border-radius: 4px;
  text-align: center;
  color: #666;
  font-size: 11px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.file-dropzone.dragover {
  border-color: #44ff44;
  color: #44ff44;
  background: rgba(68, 255, 68, 0.05);
}

.file-actions {
  padding: 8px;
  border-top: 1px solid #222;
  flex-shrink: 0;
}

.btn-sm {
  padding: 2px 8px;
  font-size: 11px;
}

/* --- Status Bar --- */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #111;
  border-top: 1px solid #222;
  height: 40px;
  flex-shrink: 0;
  font-size: 12px;
}

.status-bar .status-left,
.status-bar .status-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #444;
}

.status-dot.connected {
  background: #44ff44;
  box-shadow: 0 0 6px rgba(68, 255, 68, 0.5);
}

.status-dot.disconnected {
  background: #ff4444;
  box-shadow: 0 0 6px rgba(255, 68, 68, 0.5);
}

.btn-control {
  padding: 4px 10px;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  color: #aaa;
  font-family: "Courier New", monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-control:hover {
  background: #333;
  color: #fff;
}
