/* Clean, Modern SaaS Theme for linkdepot.net (Emerald & Slate) */
:root {
  --primary-color: #10b981; /* Emerald 500 */
  --primary-hover: #059669; /* Emerald 600 */
  --primary-glow: rgba(16, 185, 129, 0.15);
  
  --bg-app: #f8fafc; /* Slate 50 */
  --bg-container: #ffffff; /* White */
  --bg-sidebar: #f1f5f9; /* Slate 100 */
  
  --border-color: #e2e8f0; /* Slate 200 */
  --border-focus: #10b981;
  
  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #94a3b8; /* Slate 400 */
  --text-on-primary: #ffffff;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-app: #0f172a; /* Slate 900 */
    --bg-container: #1e293b; /* Slate 800 */
    --bg-sidebar: #17253d; /* Adjusted Slate */
    
    --border-color: #334155; /* Slate 700 */
    
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #cbd5e1; /* Slate 300 */
    --text-muted: #64748b; /* Slate 500 */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  }
}

/* Reset default styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-app);
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Main Layout Wrapper */
#bg {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

#shadow {
  max-width: 1400px;
  margin: 0 auto;
  background-color: var(--bg-container);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding: 24px 40px 40px 40px;
  box-shadow: var(--shadow-lg);
  min-height: 100vh;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Header */
header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

#blogname {
  text-decoration: none;
  display: block;
}

#blogname span.bold {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 8px;
}

#blogname span.bold::before {
  content: "📂";
  font-size: 28px;
}

header h1 {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 4px;
  font-family: var(--font-body);
}

/* Navigation Links */
nav {
  margin-bottom: 32px;
}

#nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

#nav li a {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

#nav li a:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-on-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Two Column Layout Container */
#container {
  display: flex;
  gap: 32px;
}

#left-col {
  flex: 1;
  min-width: 0;
}

/* Content Container Card */
.post {
  background-color: var(--bg-container);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.entry_header {
  margin-bottom: 24px;
}

.entry_header h2 {
  font-size: 28px;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.entry_header h2 a {
  color: inherit;
  text-decoration: none;
}

.entry_header h2 a:hover {
  color: var(--primary-color);
}

.entry_content {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.entry_content p {
  margin-bottom: 16px;
}

.entry_content a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.entry_content a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.entry_content ul, .entry_content ol {
  margin: 12px 0 20px 24px;
}

.entry_content li {
  margin-bottom: 8px;
}

/* Sidebar Wrapper */
#sidebar {
  width: 320px;
  flex-shrink: 0;
}

#sidebar ul {
  list-style: none;
}

/* Sidebar Widgets */
.widget {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.widget h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.widget ul li {
  margin-bottom: 12px;
}

.widget ul li:last-child {
  margin-bottom: 0;
}

.widget ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  display: block;
}

.widget ul li a:hover {
  color: var(--primary-color);
  transform: translateX(4px);
}

/* Directory CSS Specifications */
.directory-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.directory-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.directory-search {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-container);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: all 0.2s ease;
}

.directory-search:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.submit-listing-btn {
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.submit-listing-btn:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

.directory-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
}

/* Directory Categories List */
.directory-categories {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  align-self: start;
}

.directory-categories h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.directory-categories ul {
  list-style: none;
}

.directory-categories ul li {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.directory-categories ul li:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.directory-categories ul li.active {
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  font-weight: 600;
}

/* Listings Grid */
.directory-listings {
  min-width: 0;
}

.no-listings {
  text-align: center;
  padding: 48px;
  background-color: var(--bg-sidebar);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.listing-card {
  background-color: var(--bg-container);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.listing-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.listing-title a {
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.listing-title a:hover {
  color: var(--primary-color);
}

.listing-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 9999px;
  white-space: nowrap;
}

.listing-card:hover .listing-badge {
  background-color: var(--primary-glow);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.listing-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.listing-footer {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}

.listing-link-text {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  display: block;
}

/* Modal Submission Form */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transform: translateZ(0);
  will-change: transform;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.directory-modal {
  background-color: var(--bg-container);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h2 {
  font-size: 20px;
}

.close-btn {
  font-size: 24px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.close-btn:hover {
  color: var(--text-primary);
}

.directory-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input, 
.form-group select, 
.form-group textarea {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-container);
  color: var(--text-primary);
  outline: none;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--border-focus);
}

.captcha-group {
  background-color: var(--bg-sidebar);
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.btn-submit {
  padding: 12px;
  background-color: var(--primary-color);
  color: var(--text-on-primary);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: center;
}

.btn-submit:hover {
  background-color: var(--primary-hover);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Responsiveness */
@media (max-width: 1024px) {
  #container {
    flex-direction: column;
    gap: 24px;
  }
  
  #sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #shadow {
    padding: 20px;
    border-left: none;
    border-right: none;
  }
  
  .directory-layout {
    grid-template-columns: 1fr;
  }
  
  header {
    flex-direction: column;
    align-items: flex-start;
  }
}
