:root {
  --primary: hsla(160, 84%, 39%, 0.85);
  --primary-hover: hsla(160, 84%, 45%, 0.95);
  --secondary: hsla(26, 63%, 45%, 0.9);
  --danger: hsla(354, 70%, 54%, 0.9);
  --success: hsla(134, 61%, 41%, 0.9);
  --warning: hsla(36, 100%, 50%, 0.9);
  --info: hsla(195, 83%, 58%, 0.9);
  --dark: hsla(222, 47%, 11%, 0.9);
  --dark-surface: hsla(225, 25%, 7%, 0.75);
  --dark-border: hsla(142, 72%, 29%, 0.4);
  --light: hsla(210, 20%, 98%, 1);
  --text-light: hsla(210, 20%, 98%, 1);
  --text-muted: hsla(210, 9%, 82%, 1);
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --shadow-sm: 0 1px 2px 0 hsla(0, 0%, 0%, 0.05);
  --shadow-md: 0 4px 6px -1px hsla(0, 0%, 0%, 0.1), 0 2px 4px -1px hsla(0, 0%, 0%, 0.06);
  --shadow-lg: 0 10px 15px -3px hsla(0, 0%, 0%, 0.1), 0 4px 6px -2px hsla(0, 0%, 0%, 0.05);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--dark);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.header {
  background-color: var(--dark-surface);
  color: var(--text-light);
  padding: 15px 20px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-bottom: 1px solid var(--dark-border);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.file-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
}

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

.main-container {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  overflow: hidden;
}

.sidebar {
  background-color: var(--dark-surface);
  border-right: 1px solid var(--dark-border);
  padding: 15px;
  overflow-y: auto;
  max-height: calc(100vh - 130px);
  transition: var(--transition-normal);
}

.sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary);
}

.file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.files-list {
  list-style: none;
  margin-top: 15px;
}

.files-list li {
  margin-bottom: 8px;
}

.files-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  word-break: break-all;
  transition: var(--transition-normal);
}

.files-list a:hover {
  background-color: hsla(142, 72%, 29%, 0.1);
}

.files-list a.active {
  background-color: var(--primary);
  color: var(--text-light);
}

.files-list a.active .file-actions {
  color: rgba(255, 255, 255, 0.8);
}

.file-actions {
  display: flex;
  gap: 10px;
  color: var(--text-light);
  opacity: 0.7;
  transition: var(--transition-normal);
}

.files-list a:hover .file-actions {
  opacity: 1;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-icon {
  color: #f7df1e; /* JavaScript sarı */
}

.editor-container {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: var(--transition-normal);
}

.file-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.file-input {
  width: 100%;
  padding: 8px 8px 8px 32px;
  border: 1px solid var(--dark-border);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: var(--transition-normal);
  background-color: hsla(225, 25%, 7%, 0.5);
  color: var(--text-light);
}

.file-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(160, 84%, 39%, 0.25);
}

.file-input-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
}

.btn-group {
  display: flex;
  gap: 5px;
}

.btn {
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-icon {
  padding: 8px;
}

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--secondary); color: white; }
.btn-secondary:hover { background-color: hsla(26, 63%, 50%, 0.95); }
.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: hsla(134, 61%, 46%, 0.95); }
.btn-warning { background-color: var(--warning); color: white; }
.btn-warning:hover { background-color: hsla(36, 100%, 55%, 0.95); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: hsla(354, 70%, 59%, 0.95); }
.btn-info { background-color: var(--info); color: white; }
.btn-info:hover { background-color: hsla(195, 83%, 63%, 0.95); }
.btn-neutral { 
  background-color: hsla(225, 25%, 7%, 0.5);
  color: var(--text-light); 
  border: 1px solid var(--dark-border);
}
.btn-neutral:hover { 
  background-color: hsla(225, 25%, 15%, 0.6);
  border-color: var(--primary);
}

.code-container {
  flex: 1;
  overflow: auto;
  position: relative;
  transition: var(--transition-normal);
}

.CodeMirror {
  height: 100%;
  font-size: 15px;
  font-family: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;
  transition: var(--transition-normal);
}

.cm-matchingbracket {
  background-color: hsla(160, 84%, 39%, 0.2) !important;
  color: inherit !important;
  border-bottom: 1px solid var(--primary) !important;
}

.status-bar {
  padding: 10px 15px;
  background-color: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  transition: var(--transition-normal);
}

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

.status-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.results-panel {
  background-color: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  overflow-y: auto;
  padding: 15px;
  max-height: 40vh;
  display: none;
  transition: var(--transition-normal);
}

.results-panel.show {
  display: block;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.results-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

.results-actions {
  display: flex;
  gap: 5px;
}

.results-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-group {
  margin-bottom: 15px;
}

.result-group-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.error, .warning, .success {
  padding: 10px 10px 10px 35px;
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-normal);
}

.error { 
  background-color: hsla(354, 100%, 90%, 0.1); 
  color: hsla(354, 100%, 90%, 1); 
  border: 1px solid hsla(354, 70%, 54%, 0.5);
}
.error:hover { background-color: hsla(354, 100%, 90%, 0.15); }

.warning { 
  background-color: hsla(36, 100%, 50%, 0.1); 
  color: hsla(36, 100%, 85%, 1); 
  border: 1px solid hsla(36, 100%, 50%, 0.5);
}
.warning:hover { background-color: hsla(36, 100%, 50%, 0.15); }

.success { 
  background-color: hsla(134, 61%, 41%, 0.1); 
  color: hsla(134, 61%, 85%, 1); 
  border: 1px solid hsla(134, 61%, 41%, 0.5);
}
.success:hover { background-color: hsla(134, 61%, 41%, 0.15); }

.error:before, .warning:before, .success:before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.error:before { content: "\f071"; }
.warning:before { content: "\f06a"; }
.success:before { content: "\f00c"; }

.error-highlight { 
  background-color: hsla(354, 100%, 90%, 0.15); 
  border-left: 3px solid hsla(354, 70%, 54%, 0.9);
}
.warning-highlight { 
  background-color: hsla(36, 100%, 50%, 0.15); 
  border-left: 3px solid hsla(36, 100%, 50%, 0.9);
}

.fab-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: var(--transition-normal);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 hsla(160, 84%, 39%, 0.7); }
  70% { box-shadow: 0 0 0 10px hsla(160, 84%, 39%, 0); }
  100% { box-shadow: 0 0 0 0 hsla(160, 84%, 39%, 0); }
}

.fab-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.fab-menu {
  position: fixed;
  bottom: 90px;
  right: 30px;
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.fab-menu.show {
  display: flex;
}

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fab-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.fab-menu-label {
  background-color: var(--dark-surface);
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  border: 1px solid var(--dark-border);
}

.fab-menu-btn:hover {
  transform: scale(1.1);
}

.toggles-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsla(0, 0%, 100%, 0.2);
  transition: var(--transition-normal);
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition-normal);
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--dark-surface);
  color: var(--text-light);
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }

.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: hsla(0, 0%, 100%, 0.1);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.8rem;
  font-family: 'Consolas', monospace;
  color: var(--text-light);
  margin-left: 5px;
}

.tooltip {
  position: relative;
}

.tooltip .tooltip-text {
  visibility: hidden;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1001;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.8rem;
  white-space: nowrap;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.no-files {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  opacity: 0.7;
}

.select-all-container {
  position: absolute;
  right: 15px;
  top: 10px;
  z-index: 10;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    display: none;
    position: fixed;
    top: 130px;
    left: 0;
    width: 300px;
    height: calc(100vh - 130px);
    z-index: 999;
  }
  
  .sidebar.show {
    display: block;
  }
  
  .toggle-sidebar {
    display: block !important;
  }
  
  .header-controls {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .file-controls, .action-controls {
    flex: 1 1 auto;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .header h1 span { display: none; }
  .header-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .file-controls {
    width: 100%;
    justify-content: space-between;
  }
  
  .action-controls {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .action-controls::-webkit-scrollbar { display: none; }
  .status-bar { flex-direction: column; align-items: flex-start; }
  .status-left, .status-right { width: 100%; }
  .toggle-label span { display: none; }
  .file-input-container { max-width: 200px; }
}

@media (max-width: 480px) {
  .toggles-container { display: none; }
  .status-right { display: none; }
  .file-controls, .action-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .btn-text { display: inline; }
  .file-input { font-size: 0.9rem; }
  .file-input-container { max-width: 150px; }
}

/* Scroll Bar Stilleri */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: hsla(225, 25%, 7%, 0.5);
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 0.25rem;
}

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