/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #000; /* Set default text color to black */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 100px auto 20px auto;
}

.device-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  padding: 20px;
  color: #000;
}

.device-header {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.device-image {
  flex: 1;
  min-width: 200px;
  text-align: center;
  margin-top: 20px;
}

.device-image img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block; /* remove inline gap */
  border-radius: 12px;
}


.device-info {
  flex: 2;
  min-width: 250px;
  padding: 15px 20px;
  background-color: rgba(255, 255, 255, 0.1); /* subtle background for glassmorphism */
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.device-info p {
  margin: 10px 0;
  line-height: 1.6;
  font-size: 15px;
  color: #333;
}

.device-info strong {
  color: #000;
}


.device-details {
  margin-top: 20px;
}

.device-details p {
  font-size: 16px;
  line-height: 1.6;
  color: #000;
}

.device-tabs {
  display: flex;
  margin-top: 20px;
  border-bottom: 2px solid rgb(64 18 90)
}

.device-tabs div {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid transparent;
  transition: background 0.3s;
  color: #000;
}

.device-tabs div.active {
  background-color: rgb(136 89 162);
  color: #fff;
  border-bottom: 2px solid rgb(64 18 90);
}

.tab-content {
  display: none;
  margin-top: 20px;
  color: #000;
}

.tab-content.active {
  display: block;
}

.device-card a {
  text-decoration: none;
  color: #007bff;
}

.device-card a:hover {
  text-decoration: underline;
}

.device-card p strong {
  color: #000;
}

.device-card .rom-link {
  display: block;
  background-color: rgba(0, 123, 255, 0.7);
  color: white;
  padding: 10px;
  margin-top: 10px;
  text-align: center;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.device-card .rom-link:hover {
  background-color: rgba(0, 86, 179, 0.9);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
  overflow: hidden;
  color: #000;
}

table, th, td {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 12px;
  text-align: left;
}

th {
  background-color: rgba(240, 240, 240, 0.8);
  color: #000;
}


.device-gallery {
    margin-top: 20px;
}

.gallery-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.gallery-image img {
    max-width: 150px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Grid layout for related devices */
.related-devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* responsive grid */
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Card styles for related devices with glassmorphism */
.related-device-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 15px;
  transition: transform 0.3s ease;
}

.related-device-card:hover {
  transform: translateY(-10px);
}

.related-device-image {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 10px;
  border-radius: 8px;
}

.related-device-name {
  font-weight: bold;
  color: #000;
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-device-card a:hover .related-device-name {
  color: #007bff;
}

.rom-button {
    display: inline-block;
    background: rgb(136, 89, 162);
    color: white !important;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.rom-button:hover {
    background: rgb(64, 18, 90);
    color: white !important;
    text-decoration: none !important;
}


.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.action-buttons form,
.action-buttons a {
    margin: 0;
}

.delete-button,
.edit-button {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease;
}

.delete-button {
    background-color: #ff4d4d;
    color: white;
}

.delete-button:hover {
    background-color: #e60000;
}

.edit-button {
    background-color: #4da6ff;
    color: white;
    text-decoration: none;
}

.edit-button:hover {
    background-color: #0073e6;
}

.back-button {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 20px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease;
    background-color: #8859A2;
    color: white;
}

.back-button:hover {
    background-color: #40125a;
}

/* Grid layout for brand cards */
.person-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 0 20px;
  width: 100%;  
  max-width: 1200px;
  margin: 0 auto;
}

/* Mobile view layout */
@media (max-width: 767px) {
  .person-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Card styles with glassmorphism */
.person-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease;
  color: #000; /* card text black */
}

.person-card:hover {
  transform: translateY(-10px);
}

.person-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  background: white;
  border-radius: 10px;
  margin-bottom: 15px;
}

.person-card a {
  text-decoration: none;
  color: #000; /* link text black */
  font-weight: bold;
  transition: color 0.3s ease;
}

.person-card a:hover {
  color: #007bff;
}
