/* HIDConnect.css
   Color palette: pencil and paper theme - cream, warm gray, muted charcoal
*/
:root{
  --paper-cream: #faf8f3;      /* warm cream paper */
  --paper-light: #f5f3f0;      /* light off-white */
  --pencil-dark: #3d3a38;      /* dark charcoal pencil */
  --pencil-gray: #7d7a78;      /* medium gray */
  --accent-warm: #8b7355;      /* warm brown accent */
  --accent-light: #c9b8a8;     /* light tan */
  --muted-bg: rgba(61,58,56,0.04);
  --card-bg: rgba(245,243,240,0.5);
  --text-on-light: #3d3a38;
  --accent: #6b5d50;           /* muted brown */
}

html,body{height:100%;}
body {
   margin: 0; font-family: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
   color: #000000;
   background: #ffffff;
   background-image:
     linear-gradient(#000000 1px, transparent 1px),
     linear-gradient(90deg, #000000 1px, transparent 1px);
   background-size: 100% 25px, 25px 100%;
   background-attachment: fixed;
   padding: 28px;
   -webkit-font-smoothing: antialiased;
   font-weight: 400;
 }

h1{
   margin-top: 0;
   color: #000000;
   text-shadow: none;
   font-family: 'Caveat', cursive;
   font-weight: 700;
   letter-spacing: 1px;
   font-size: 2.5em;
   text-align: center;
 }

 h1::before {
    content: '';
    display: inline-block;
    width: 300px;
    height: 75px;
    background-image: url('Chhap2.png');
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: 20px;
    margin-right: 10px;
  }

.card {
   background: #ffffff;
   border: 3px solid #000000;
   box-shadow: none;
   padding: 18px;
   border-radius: 0;
   max-width: 780px;
   margin: 0 auto;
   position: relative;
 }

/* Subtle paper texture effect */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(61,58,56,0.02) 2px,
      rgba(61,58,56,0.02) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(61,58,56,0.01) 2px,
      rgba(61,58,56,0.01) 4px
    );
  pointer-events: none;
  border-radius: 4px;
}

button {
   padding: 10px 14px;
   font-size: 20px;
   margin-right: 8px;
   border: 3px solid #000000;
   cursor: pointer;
   background: #ffffff;
   color: #000000;
   transition: transform .08s ease;
   box-shadow: 4px 4px 0px #000000;
   font-family: 'Caveat', cursive;
   font-weight: 700;
   letter-spacing: 0.5px;
   position: relative;
   clip-path: polygon(0% 0%, 95% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 95%);
 }

button:hover{
   transform: translateY(-2px);
   background: #f0f0f0;
   box-shadow: 5px 5px 0px #000000;
 }

button:active {
   transform: translateY(1px);
   box-shadow: 3px 3px 0px #000000;
 }

button.secondary{
   background: #ffffff;
   border-color: #000000;
   color: #000000;
 }

#devicesList { margin-top: 12px; }

.deviceItem {
   padding: 10px;
   border-radius: 0;
   margin-bottom: 10px;
   display: flex;
   align-items: center;
   justify-content: space-between;
   background: #ffffff;
   border: 2px solid #000000;
   box-shadow: 3px 3px 0px #000000;
   font-size: 20px;
 }

.deviceItem div { 
  font-weight: 700; 
  color: var(--text-on-light);
  font-family: 'Segoe Print', 'Comic Sans MS', cursive;
  font-size: 0.95em;
}

.hidden { display: none; }

#status {
   margin-top: 12px;
   padding: 10px;
   border-radius: 0;
   font-size: 20px;
   color: #0000ff;
   background: #ffffff;
   border: 2px solid #000000;
   box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
   min-height: 40px;
   max-height: 220px;
   overflow-y: auto;
   white-space: pre-wrap;
   font-family: 'Courier New', monospace;
   font-weight: bold;
 }

/* small screens */
@media (max-width:520px){
  .card{ padding:14px; margin: 8px; }
  button{ width:100%; margin-bottom:8px; }
  .deviceItem{ flex-direction:column; align-items:flex-start; }
}

/* Strong disabled appearance for buttons */
button[disabled] {
   opacity: 0.6;
   cursor: not-allowed;
   filter: grayscale(0.5) brightness(0.95);
   transform: none !important;
   box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
   background: #ffffff;
   color: #666666;
   border-color: #000000;
   pointer-events: none;
 }

/* also make the select button inside deviceItem look disabled appropriately */
.deviceItem button[disabled] { opacity: 0.6; }

.warning {
  background: #ffffff;
  border: 3px solid #000000;
  border-radius: 0;
  padding: 15px;
  margin-bottom: 20px;
  color: #000000;
  font-weight: bold;
  font-size: 24px;
  text-align: center;
  box-shadow: 4px 4px 0px #000000;
  position: relative;
  clip-path: polygon(0% 0%, 95% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 95%);
}

.update-indicator {
  background: #ffffff;
  border: 3px solid #008000;
  border-radius: 0;
  padding: 15px;
  margin-bottom: 20px;
  color: #000000;
  font-weight: bold;
  font-size: 24px;
  text-align: center;
  box-shadow: 4px 4px 0px #000000;
  position: relative;
  clip-path: polygon(0% 0%, 95% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 95%);
}

.warning::before {
  content: '⚠️';
  font-size: 24px;
  margin-right: 10px;
}

/* Top right cards */
.top-right-cards {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.top-right-card {
  background: #ffffff;
  border: 3px solid #000000;
  box-shadow: 4px 4px 0px #000000;
  padding: 10px 15px;
  border-radius: 0;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.top-right-btn {
  display: inline-block;
  padding: 8px 12px;
  font-size: 16px;
  border: 2px solid #000000;
  cursor: pointer;
  background: #ffffff;
  color: #000000;
  text-decoration: none;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: transform .08s ease;
  box-shadow: 3px 3px 0px #000000;
}

.top-right-btn:hover {
  transform: translateY(-2px);
  background: #f0f0f0;
  box-shadow: 4px 4px 0px #000000;
}

.social-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.social-link {
  color: #000000;
  font-size: 1.5rem;
  transition: transform 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.social-link:hover {
  transform: scale(1.2);
}

.social-link.reddit:hover {
  color: #FF4500;
}

.social-link.instagram:hover {
  color: #E1306C;
}
.social-link.facebook:hover {
  color: #4267B2;
}

.social-link.youtube:hover {
  color: #FF0000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .top-right-cards {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 20px;
    align-self: flex-end;
  }
  
  .top-right-card {
    padding: 8px;
  }
  
  .top-right-btn {
    font-size: 14px;
    padding: 6px 10px;
  }
  
  .social-link {
    font-size: 1.2rem;
  }
}
