@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

* { 
  box-sizing: border-box; 
  font-family: "Inter", system-ui;
  font-optical-sizing: auto;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #fff;
  min-height: 100vh;
  background-image: url("../static/images/0027.jpg");
  /*background-size: cover;
  background-position: center;*/
}

body {
  padding: 2rem;
  position: relative;
}

/* Home button styling */
.home-button {
  position: fixed;
  top: 2rem;
  left: 2rem;
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  text-decoration: none;
  z-index: 20;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.home-button:hover::before {
  opacity: 1;
}

.home-button:hover {
  background-color: rgba(233, 233, 233, 0.221);
  backdrop-filter: blur(10px);
}

/* Welcome button styling */
.welcome-button {
  position: fixed;
  top: 2rem;
  right: 11rem;
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 1rem;
  z-index: 100;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  overflow: hidden;
}

.welcome-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.welcome-button:hover::before {
  opacity: 1;
}

.welcome-button:hover {
  background-color: rgba(233, 233, 233, 0.221);
  backdrop-filter: blur(10px);
}

.welcome-button #userName {
  font-weight: 600;
}

.welcome-button {
  overflow: hidden;
  white-space: nowrap;
  width: auto;
  min-width: fit-content;
}

.welcome-button .default-text {
  display: inline-block;
  transition: all 0.3s ease-in-out;
  transform: translateX(0);
}

.welcome-button .hover-text {
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateX(100%);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  font-weight: 400;
  white-space: nowrap;
}

.welcome-button:hover {
  padding-left: 2rem;
  padding-right: 2rem;
}

.welcome-button:hover .default-text {
  opacity: 0;
  transform: translateX(-100%);
}

.welcome-button:hover .hover-text {
  opacity: 1;
  transform: translate(-50%, -50%) translateX(0);
}

/* Login button styling */
.login-button {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  text-decoration: none;
  z-index: 20;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.login-button:hover::before {
  opacity: 1;
}

.login-button:hover {
  background-color: rgba(233, 233, 233, 0.221);
  backdrop-filter: blur(10px);
}

/* Sign out button styling (red theme) */
.login-button.sign-out {
  background-color: rgba(255, 67, 67, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ff4343;
  border: 1px solid rgba(255, 67, 67, 0.3);
}

.login-button.sign-out:hover {
  background-color: rgba(255, 67, 67, 0.3);
  color: #ff2828;
}

/* Main container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 8rem;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.header h1 {
  margin: 0;
  font-size: 2.5rem;
  color: #fff;
  font-family: 'Brigends Expanded', sans-serif;
}

.subtext {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  color: #ccc;
}

/* Create device button */
.create-device-btn {
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 2rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto 3rem;
}

.create-device-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.create-device-btn:hover::before {
  opacity: 1;
}

.create-device-btn:hover {
  background-color: rgba(233, 233, 233, 0.221);
  backdrop-filter: blur(10px);
}

/* Devices list */
.devices-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* Device entry card */
.device-entry {
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.device-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  cursor: pointer;
}

.device-entry:hover {
  background-color: rgba(233, 233, 233, 0.137);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.device-image {
  width: 80px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-image img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.device-info {
  flex: 1;
}

.device-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.device-serial {
  font-size: 0.9rem;
  color: #999;
  margin: 0.75rem 0 0 0;
  font-family: monospace;
}

.device-location {
  font-size: 0.9rem;
  color: #999;
  margin: 0.3rem 0 0 0;
}

.device-location i {
  margin-right: 0.5rem;
}

.edit-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #999;
  transition: color 0.2s ease;
}

.device-entry:hover .edit-icon {
  color: #fff;
}

/* Device Actions Buttons */
.device-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.customize-btn, .edit-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 0.75rem 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.customize-btn::before, .edit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.customize-btn:hover::before, .edit-btn:hover::before {
  opacity: 1;
}

.customize-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.edit-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* Modal styling */
.modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 100;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  background-color: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: all 0.2s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.modal-header h2 {
  margin: 0;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #fff;
}

/* Form styling */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #ccc;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  font-size: 1rem;
}

.form-group input::placeholder {
  color: #666;
}

.location-input-group {
  display: flex;
  gap: 0.75rem;
}

.location-btn {
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.5rem;
  border-radius: 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  white-space: nowrap;
}

.location-btn:hover {
  background-color: rgba(233, 233, 233, 0.221);
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.delete-btn {
  background-color: rgba(255, 67, 67, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ff4343;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 67, 67, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.delete-btn:hover {
  background-color: rgba(255, 67, 67, 0.3);
  color: #ff2828;
}

.save-btn {
  background-color: rgba(52, 168, 83, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #34a853;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(52, 168, 83, 0.3);
  padding: 0.75rem 2rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.save-btn:hover {
  background-color: rgba(52, 168, 83, 0.3);
  color: #2d9048;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 4rem;
  position: absolute;
  top: calc(50% + 6rem);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  color: #fff;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error text styling */
.error-text {
  color: #ff4343;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Account settings modal */
.account-info {
  padding: 0;
}

.account-section {
  margin-bottom: 2rem;
}

.account-section h3 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.account-section p {
  color: #ccc;
  margin: 0.5rem 0;
}

.account-section strong {
  color: #fff;
  margin-right: 0.5rem;
}

/* Danger zone styling */
.danger-zone {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin: 0;
}

.danger-warning {
  color: #ff6767;
  font-size: 0.9rem;
}

.delete-account-btn {
  background-color: rgba(255, 67, 67, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ff4343;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 67, 67, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  margin-bottom: 1rem;
}

.delete-account-btn:hover {
  background-color: rgba(255, 67, 67, 0.3);
  color: #ff2828;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem;
  position: absolute;
  top: calc(50% + 6rem);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  color: white;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.empty-state p {
  margin-bottom: 2rem;
}

/* Delete confirmation modal */
.delete-modal-content {
  text-align: center;
  max-width: 400px;
}

.delete-icon {
  margin: 0 auto 1.5rem;
  color: #ff4343;
}

.delete-modal-content h2 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.delete-modal-content p {
  color: #ccc;
  margin: 0.5rem 0;
}

#deleteDeviceName {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  margin: 1rem 0;
}

.delete-warning {
  color: #ff6767 !important;
  font-size: 0.9rem;
  margin-bottom: 2rem !important;
}

.delete-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.cancel-btn {
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 2rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.cancel-btn:hover {
  background-color: rgba(233, 233, 233, 0.221);
}

.confirm-delete-btn {
  background-color: rgba(255, 67, 67, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ff4343;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 67, 67, 0.3);
  padding: 0.75rem 2rem;
  border-radius: 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.confirm-delete-btn:hover {
  background-color: rgba(255, 67, 67, 0.3);
  color: #ff2828;
}

/* Login modal styling */
.login-modal-content {
  text-align: center;
  max-width: 400px;
}

.login-modal-content h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.login-modal-content p {
  color: #ccc;
  margin-bottom: 2rem;
}

/* Google sign-in button styling (glassmorphic design) */
.google-signin-button {
  background-color: rgba(151, 151, 151, 0.137);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.5rem;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto;
  min-width: 200px;
  margin-bottom: 1.5rem;
}

.google-signin-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.google-signin-button:hover::before {
  opacity: 1;
}

.google-signin-button:hover {
  background-color: rgba(233, 233, 233, 0.221);
  backdrop-filter: blur(10px);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.font {
  font-family: 'Brigends Expanded', sans-serif;
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
}