/* assets/style.css */
:root {
  /* Color Variables */
  --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  --header-gradient: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
  --primary-blue: #3498db;
  --dark-blue: #2980b9;
  --secondary-green: #2ecc71;
  --dark-green: #27ae60;
  --danger-red: #e74c3c;
  --dark-red: #c0392b;
  --purple: #9b59b6;
  --dark-purple: #8e44ad;
  --text-dark: #2c3e50;
  --text-medium: #5e6565;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --border-light: #ddd;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--primary-gradient);
  color: #333;
  min-height: 100vh;
  padding: 20px;
}

/* Container Styles - Fixed for proper centering */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

.content-card {
  background-color: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.login-container,
.reset-container,
.success-container {
  max-width: 650px;
  margin: 0 auto;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.register-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Main Header Banner Styles */
.main-header {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 25px;
    text-align: center;
    border-radius: 15px 15px 0 0;
}

.main-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.main-header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Profile page specific header adjustment */
.profile-header {
    border-radius: 0; /* Remove border radius for profile header */
    margin-bottom: 20px;
}

/* Header Styles */
.header,
.login-header,
.reset-header,
.success-header,
.register-header {
  background: var(--header-gradient);
  color: var(--white);
  padding: 25px;
  text-align: center;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  border-radius: 15px 15px 0 0;
}

.header h1,
.login-header h1,
.reset-header h1,
.success-header h1,
.register-header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.header p,
.login-header p,
.reset-header p,
.success-header p,
.register-header p {
  font-size: 1rem;
  opacity: 0.9;
}

/* Content Areas */
.profile-content,
.login-form,
.reset-form,
.success-content,
.register-content {
  padding: 30px;
}

/* Card Components */
.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-light);
  overflow: hidden;
  margin-bottom: 20px;
}

.user-card {
  padding: 25px;
  text-align: center;
}

.connections-card,
.qr-card,
.scanner-card {
  padding: 25px;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Button Styles */
.btn,
.login-button,.reset-button,
.register-button,.upload-button,
.back-btn,.save-btn,
.edit-btn,.cancel-btn,
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  border: none;
  gap: 8px;
  white-space: nowrap;
}

.btn-primary,
.login-button,
.reset-button {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn-primary:hover,
.login-button:hover,
.reset-button:hover {
  background-color: var(--dark-blue);
}

.btn-secondary,.edit-btn,
.save-btn {
  background-color: var(--secondary-green);
  color: var(--white);
}

.btn-secondary:hover,.edit-btn:hover,
.save-btn:hover {
  background-color: var(--dark-green);
}

.btn-danger,.cancel-btn,
.logout-btn {
  background-color: var(--danger-red);
  color: var(--white);
}

.btn-danger:hover,.cancel-btn:hovertal,
.logout-btn:hover {
  background-color: var(--dark-red);
}

.btn-purple,
.upload-button {
  background-color: var(--purple);
  color: var(--white);
}

.btn-purple:hover,
.upload-button:hover {
  background-color: var(--dark-purple);
}

.back-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.back-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Message Styles */
.error-message {
  color: var(--danger-red);
  text-align: center;
  margin: 15px 0;
  font-weight: 500;
  padding: 10px;
  background-color: #fadbd8;
  border-radius: 5px;
}

.success-message {
  color: var(--dark-green);
  text-align: center;
  margin: 15px 0;
  font-weight: 500;
  font-size: 18px;
  padding: 10px;
  background-color: #d5f5e3;
  border-radius: 5px;
}

.connection-message {
  padding: 15px;
  margin: 15px 0;
  border-radius: 8px;
  text-align: center;
}

.connection-success {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid var(--dark-green);
}

.connection-error {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid var(--danger-red);
}

.connection-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid var(--primary-blue);
}

/* Profile Elements */
.user-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  margin: 0 auto 15px;
  border: 4px solid var(--primary-blue);
}

.user-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.user-department {
  color: var(--text-medium);
  margin-bottom: 15px;
  font-size: 1rem;
}

.user-joined {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Layout Utilities */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-section,
.hobby-section {
  display: flex;
  margin-bottom: 40px;
  gap: 30px;
}

.profile-image,
.hobby-image,
.image-preview {
  flex: 0 0 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.profile-image img,
.hobby-image img,
.image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.profile-text,
.hobby-text {
  flex: 1;
}

.profile-text h2,
.hobby-text h2 {
  color: var(--text-dark);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.profile-text p,
.hobby-text p {
  line-height: 1.6;
  font-size: 16px;
  color: #555;
}

/* Instructions Box */
.instructions {
  background-color: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-blue);
}

.instructions h3 {
  margin-top: 0;
  color: var(--text-dark);
}

.instructions ol,
.instructions ul {
  padding-left: 20px;
}

.instructions li {
  margin-bottom: 10px;
}

/* Link Styles */
.login-link,
.register-link,
.forgot-password {
  text-align: center;
  margin-top: 20px;
  color: var(--text-light);
}

.login-link a,
.register-link a,
.forgot-password a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
}

.login-link a:hover,
.register-link a:hover,
.forgot-password a:hover {
  text-decoration: underline;
}

/* Connection List */
.connections-list {
  list-style-type: none;
}

.connections-list li {
  padding: 12px 15px;
  margin-bottom: 10px;
  background-color: var(--bg-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.connections-list li:hover {
  background-color: #e8f4fc;
}

.connection-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.connection-info {
  flex: 1;
}

.connection-name {
  font-weight: 500;
  color: var(--text-dark);
}

.connection-department {
  font-size: 0.85rem;
  color: var(--text-medium);
}

.no-connections {
  text-align: center;
  padding: 30px;
  color: var(--text-medium);
  font-style: italic;
}

/* QR Code Styles */
.qr-title,
.scanner-title,
.connections-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.qr-code-container {
  margin-bottom: 20px;
}

.qr-code-container img {
  max-width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 15px;
  background-color: var(--white);
}

.qr-description {
  color: var(--text-light);
  margin-bottom: 20px;
}

/* Scanner Styles */
.scanner-controls {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

#reader {
  width: 100%;
  height: 300px;
  margin: 20px 0;
  border: 2px dashed #bdc3c7;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

#canvas {
  display: none;
}

.scanning-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--danger-red);
  box-shadow: 0 0 10px var(--danger-red);
  animation: scan 2s linear infinite;
  z-index: 10;
  display: none;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

#scanner-placeholder {
  text-align: center;
  color: #fff;
  padding: 20px;
}

.permission-status {
  padding: 12px;
  margin: 15px 0;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.permission-granted {
  background-color: #d4edda;
  color: #155724;
  border-left: 4px solid var(--dark-green);
}

.permission-denied {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid var(--danger-red);
}

/* Image Upload Styles */
.image-upload {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.upload-controls {
  flex: 1;
}

.upload-controls label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.upload-controls input[type="file"] {
  margin-bottom: 15px;
}

/* Rich Text Editor */
.rich-text-editor {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.toolbar {
  background-color: var(--bg-light);
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.toolbar button {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 14px;
}

.toolbar button:hover {
  background-color: #e9ecef;
  border-color: var(--border-light);
}

.editor {
  min-height: 200px;
  padding: 15px;
  outline: none;
  overflow-y: auto;
  line-height: 1.6;
}

.editor:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.editor ul,
.editor ol {
  padding-left: 30px;
  margin: 10px 0;
}

.hidden-textarea {
  display: none;
}

/* Success Icon */
.success-icon {
  font-size: 64px;
  color: var(--dark-green);
  margin-bottom: 20px;
}

/* Form Sections */
.form-section,
.csv-section {
  flex: 1;
  min-width: 300px;
  padding: 30px;
}

.form-section {
  border-right: 1px solid #eee;
}

.section-title {
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

.file-input {
  margin-bottom: 20px;
}

.file-input label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

/* Add these styles to properly handle content wrapping */
.profile-text, 
.hobby-text {
  min-width: 0; /* Allows flex items to shrink properly */
}

.profile-text > div, 
.hobby-text > div {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
}

.profile-text > div ul,
.profile-text > div ol,
.hobby-text > div ul,
.hobby-text > div ol {
  padding-left: 30px;
  margin: 10px 0;
  overflow-wrap: break-word;
}

.profile-text > div li,
.hobby-text > div li {
  margin-bottom: 5px;
  overflow-wrap: break-word;
}

.profile-text img,
.hobby-text img {
  max-width: 100%;
  height: auto;
}

/* Fireworks Overlay (for profile.php) */
.fireworks-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

.fireworks-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.fireworks-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.connection-success-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  z-index: 1001;
  min-width: 300px;
}

.connection-success-message h2 {
  color: var(--dark-green);
  margin-bottom: 15px;
}

.close-overlay {
  position: absolute;
  top: -20px;
  right: -20px;
  background: var(--danger-red);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 25px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1002;
  box-shadow: var(--shadow-light);
}

/* Styles for the new preview/edit functionality */
/* Styles for the new preview/edit functionality */
.hidden {
  display: none;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Edit and Cancel button styles */
.edit-btn, .cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  border: none;
  gap: 8px;
  white-space: nowrap;
}

.edit-btn {
  background-color: var(--secondary-green);
  color: var(--white);
}

.edit-btn:hover {
  background-color: var(--dark-green);
}

.cancel-btn {
  background-color: var(--danger-red);
  color: var(--white);
}

.cancel-btn:hover {
  background-color: var(--dark-red);
}

/* Header buttons container */
.header-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Ensure proper spacing for the new layout */
.profile-content {
  position: relative;
}

/* Sash styling */
.user-card {
    position: relative;
    overflow: visible;
}

.user-sash {
    position: absolute;
    top: -20px;
    left: -20px;
    z-index: 10;
    pointer-events: none;
}

.sash-image {
    width: 80px;
    height: auto;
    filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.3));
}


/* Responsive adjustments for the new buttons */
@media (max-width: 600px) {
  .edit-btn, .cancel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }
  
  .edit-btn .btn-text,
  .cancel-btn .btn-text {
    display: none !important;
  }
  
  .edit-btn .material-icons,
  .cancel-btn .material-icons {
    margin-right: 0 !important;
    font-size: 24px;
  }
  
  .header-buttons {
    gap: 15px;
  }
}

@media (min-width: 601px) {
  .edit-btn .btn-text,
  .cancel-btn .btn-text {
    display: inline-block !important;
  }
  
  .edit-btn, .cancel-btn {
    width: auto !important;
    height: auto !important;
    border-radius: 40px !important;
    padding: 10px 20px !important;
  }
  
  .edit-btn .material-icons,
  .cancel-btn .material-icons {
    margin-right: 8px !important;
    font-size: 20px !important;
  }
}

.edit-btn, .cancel-btn{
  order:4;
}
/* ===== RESPONSIVE STYLES ===== */
/* Mobile First Approach - Default styles are for mobile */
/* Responsive adjustments */

@media (max-width: 768px) {
    .user-sash {
        top: -15px;
        left: -15px;
    }
    
    .sash-image {
        width: 60px;
    }
}

/* For very small screens (max-width: 480px) */
@media (max-width: 480px) {
  .header {
    padding: 15px;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .header-buttons {
    gap: 15px;
  }
  
  .back-btn,
  .logout-btn {
    width: 45px;
    height: 45px;
  }

  .profile-content {
    padding: 15px;
  }

  .user-card, .qr-card, .scanner-card, .connections-card {
    padding: 15px;
  }

  /* Ensure proper spacing on very small screens */
  .sidebar, .main-content {
    width: 100%;
  }

  /* Ensure scanner buttons stay circular on very small screens */
  .scanner-controls .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0;
  }
  
  /* Adjust scanner controls layout for very small screens */
  .scanner-controls {
    gap: 15px;
    justify-content: center;
  }
  
  /* Keep buttons circular on very small screens */
  .back-btn, .save-btn, .logout-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0;
  }
  
  /* Keep text hidden on all mobile sizes */
  .btn .btn-text,
  .back-btn .btn-text,
  .save-btn .btn-text,
  .logout-btn .btn-text {
    display: none !important;
  }
  
  /* Adjust scanner controls for very small screens */
  .scanner-controls {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px; /* Increased gap between buttons */
  }
  
  .scanner-controls .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0;
  }
  
  /* Header adjustments for very small screens */
  .header {
    flex-direction: column;
    gap: 10px;
  }
  
  .header h1 {
    order: 1;
    font-size: 1.5rem;
  }
  
  .header-buttons {
    order: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }
  
  /* Content area adjustments */
  .profile-content,
  .login-form,
  .reset-form,
  .success-content,
  .register-content {
    padding: 15px;
  }

  .connections-card{
    order: 5; /* Ensure buttons appear before the title */
  }
}

/* For small screens (max-width: 600px) */
@media (max-width: 600px) {
  .profile-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .sidebar, .main-content {
    display: contents;
  }

  .profile-text > div, 
  .hobby-text > div {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .profile-text > div ul,
  .profile-text > div ol,
  .hobby-text > div ul,
  .hobby-text > div ol {
    padding-left: 20px;
  }

  .header {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }
  
  .header h1 {
    order: 1;
    margin: 0;
    width: 100%;
    text-align: center;
  }
  
  .header-buttons {
    order: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }
  
  /* Hide button text on mobile */
  .back-btn .btn-text,
  .logout-btn .btn-text {
    display: none !important;
  }

  /* Adjust button styles for icon-only */
  .back-btn,
  .logout-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }
  
  /* Ensure icons are centered */
  .back-btn .material-icons,
  .logout-btn .material-icons {
    margin-right: 0 !important;
  }
  /* Reorder profile grid for mobile */
  .profile-grid {
    display: flex;
    flex-direction: column;
  }

  /* Make sidebar and main-content containers neutral */
  .sidebar, .main-content {
    display: contents; /* This makes the children act as direct children of profile-grid */
  }

  /* Explicitly order each card */
  .user-card {
    order: 1;
  }
  
  .qr-card {
    order: 2;
  }
  
  .scanner-card {
    order: 3;
  }
  
  .connections-card {
    order: 4;
  }
  
  /* Additional adjustments for better mobile layout */
  .connections-card, .qr-card, .scanner-card {
    margin-bottom: 20px;
  }

  .btn, .back-btn, .save-btn, .logout-btn,
  .register-button,.upload-button {
    padding: 14px; /* Increased padding for larger hit area */
    width: 50px; /* Slightly larger for better touch targets */
    height: 50px;
    border-radius: 50%;
    justify-content: center;
    margin: 0 7.5px; /* 15px total spacing between buttons */
  }
  
  .btn .btn-text,
  .back-btn .btn-text,
  .save-btn .btn-text,
  .logout-btn .btn-text,
  .register-button .btn-text,
  .upload-button .btn-text {
    display: none !important;
  }
  
  .btn .material-icons,
  .back-btn .material-icons,
  .save-btn .material-icons,
  .logout-btn .material-icons,
  .login-button .material-icons,
  .reset-button .material-icons,
  .register-button .material-icons,
  .upload-button .material-icons {
    margin-right: 0 !important;
    font-size: 24px; /* Increased by 4px as requested */
  }
  
  /* Adjust scanner controls for better mobile layout */
  .scanner-controls .btn {
    transition: all 0.3s ease;
    margin-bottom: 0; /* Remove bottom margin since we're using gap */
  }
  
  /* Ensure scanner control buttons become circular on mobile */
  .scanner-controls .btn {
    padding: 14px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 7.5px;
    justify-content: center;
  }
  
  .scanner-controls .btn .btn-text {
    display: none !important;
  }
  
  .scanner-controls .btn .material-icons {
    margin-right: 0 !important;
    font-size: 24px;
  }
  
  /* Keep scanner controls in a row on mobile */
  .scanner-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  /* Ensure proper spacing for profile page cards*/
  .user-card, .qr-card, .scanner-card, .connections-card {
    margin-bottom: 20px;
  }

  /* Ensure proper spacing for header buttons */
  .header-buttons {
    gap: 15px; /* Increased gap between buttons */
  }
  
  /* Header adjustments for mobile */
  .header {
    padding: 15px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .header-buttons {
    order: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
  }
  .header .back-btn,
  .header .save-btn,
  .header .logout-btn {
    margin: 0;
    order: 2; /* Ensure buttons appear before the title */
  }
  
  .header h1 {
    order: 1; /* Ensure title appears after buttons */
    width: 100%;
    text-align: center;
    font-size: 1.8rem;
    margin: 10px 0;
  }
  
  /* Profile grid adjustments for mobile */
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .profile-section,
  .hobby-section {
    flex-direction: column;
    margin-bottom: 20px;
    gap: 15px;
  }
  
  .profile-image,
  .hobby-image,
  .image-preview {
    flex: 0 0 auto;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  /* Form adjustments for mobile */
  .form-section,
  .csv-section {
    min-width: auto;
    padding: 15px;
  }
  
  .form-section {
    border-right: none;
    border-bottom: 1px solid #eee;
  }
  
  .image-upload {
    flex-direction: column;
    gap: 15px;
  }

  .connections-card{
    order: 5; /* Ensure buttons appear before the title */
  }
}

/* For desktop screens (min-width: 601px) */
@media (min-width: 601px) {
  .btn .btn-text,
  .back-btn .btn-text,
  .save-btn .btn-text,
  .logout-btn .btn-text,
  .login-button .btn-text,
  .reset-button .btn-text,
  .register-button .btn-text,
  .upload-button .btn-text {
    display: inline-block !important;
  }
  
  .btn, .back-btn, .save-btn, .logout-btn,
  .login-button, .reset-button, .register-button,
  .upload-button {
    width: auto !important;
    height: auto !important;
    border-radius: 40px !important;
    padding: 10px 20px !important;
  }
  
  .btn .material-icons,
  .back-btn .material-icons,
  .save-btn .material-icons,
  .logout-btn .material-icons,
  .login-button .material-icons,
  .reset-button .material-icons,
  .register-button .material-icons,
  .upload-button .material-icons {
    margin-right: 8px !important;
    font-size: 20px !important;
  }
  
  /* Ensure profile grid uses 2 columns on desktop */
  .profile-grid {
    display: grid !important;
    grid-template-columns: 1fr 2fr !important;
    gap: 20px !important;
  }
  
  .sidebar, .main-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
}