/* === Global Styles === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
  }
  
  .container {
    max-width: 800px;
    margin: 2em auto;
    padding: 1em 2em;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  /*---"Create New Snippet" Link*/
  .create-link {
    display: inline-block;
    margin-bottom: 1em;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
  }

  .create-link:hover {
    text-decoration: underline;
  }
  
  /* === Flash Messages === */
  .flash {
    padding: 0.75em;
    border-radius: 4px;
    margin-bottom: 1em;
    text-align: center;
  }
  
  .flash.error {
    background-color: #e74c3c;
    color: #fff;
  }
  
  .flash.success {
    background-color: #2ecc71;
    color: #fff;
  }
  
  /* === Shared Form Styles (Create & Edit) === */
  .form-container {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: auto;
  }
  
  .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.2em;
  }
  
  .form-group label {
    font-weight: bold;
    margin-bottom: 0.5em;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    padding: 0.7em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
  }
  
  .form-group textarea {
    min-height: 120px;
  }
  
  .btn {
    padding: 0.7em 1.2em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
  }
  
  /* Submit button (for create & edit forms) */
  .submit-btn {
    background-color: #3498db;
    color: #fff;
    margin-top: 0.5em;
  }
  
  .submit-btn:hover {
    background-color: #2980b9;
  }
  
  /* Back Link Style (common to all views) */
  .back-link {
    display: inline-block;
    margin-top: 1em;
    text-decoration: none;
    color: #3498db;
  }
  
  .back-link:hover {
    text-decoration: underline;
  }
  
  /* === Snippet List Styles === */
  .snippet-list {
    list-style-type: none;
    padding: 0;
  }
  
  .snippet-list li {
    background-color: #fff;
    margin: 0.5em 0;
    padding: 1em;
    border-left: 5px solid #3498db;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  }
  
  .snippet-list li h2 {
    margin-top: 0;
  }
  
  .snippet-list li p {
    margin: 0.5em 0 1em;
  }
  
  .snippet-list li .actions {
    margin-top: 1em;
    text-align: right;
  }

  .snippet-view .action-buttons a,
  .snippet-view .action-buttons form {
    display: inline-block;
  }
  
   .snippet-view .action-buttons a {
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    color: #fff;
    margin-right: 0.5em;
  }

  .snippet-list li .actions a,
  .snippet-list li .actions form {
    display: inline-block;
  }
  
  .snippet-list li .actions a {
    text-decoration: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    color: #fff;
    margin-right: 0.5em;
  }
  
  .snippet-list li .actions a.view {
    background-color: #3498db;
  }
  
   .snippet-view .action-buttons a.edit {
    background-color: #f39c12;
  }

  .snippet-list li .actions a.edit {
    background-color: #f39c12;
  }

  .snippet-view .action-buttons form button {
    background-color: #e74c3c;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
  }
  
  .snippet-list li .actions form button {
    background-color: #e74c3c;
    border: none;
    padding: 0.5em 1em;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
  }
  
  .snippet-view .action-buttons a:hover,
  .snippet-view .action-buttons form button:hover {
    opacity: 0.9;
  }
  
  .snippet-list li .actions a:hover,
  .snippet-list li .actions form button:hover {
    opacity: 0.9;
  }
  
  /* === Logged-In User Info === */
.user-info {
  background-color: #3498db;
  color: #fff;
  padding: 1em;
  border-radius: 6px;
  margin-bottom: 1.5em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info .user-details {
  display: flex;
  align-items: center;
}

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 1em;
}

.user-info .logout-link {
  color: #fff;
  text-decoration: underline;
  font-size: 0.95em;
}

  /* === Snippet View Styles === */
  .snippet-view {
    padding: 1em;
  }
  
  .snippet-view h1 {
    font-size: 2em;
    margin-bottom: 0.5em;
  }
  
  .snippet-code {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 1em;
  }
  
  /* Action Buttons for Snippet View */
  .snippet-view .action-buttons {
    margin-top: 1em;
  }
  
  /* === Top Navbar === */
.navbar {
  background-color: #3498db;
  padding: 0.75em 1.5em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0 0 8px 8px;
  color: white;
}

.navbar a {
  color: white;
  text-decoration: none;
  margin-right: 1em;
  font-weight: bold;
}

.navbar a:hover {
  text-decoration: underline;
}

.navbar .welcome-text {
  margin-right: 1em;
  font-weight: normal;
  color: #e0f7ff;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}
