:root {
  --primary: #6c63ff;
  --bg: #0f1224;
  --card: rgba(255,255,255,0.08);
  --glass: blur(18px);
  --radius: 18px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(135deg, #0f1224, #1b1f4b);
  min-height: 100vh;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.app {
  width: 100%;
  max-width: 1000px;
  background: var(--card);
  backdrop-filter: var(--glass);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
header .logo{
    text-decoration: none;
    color: #fff;
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

#appLogo {
  width: 50px;           
  height: 50px;
  object-fit: contain;    
  border-radius: 12px;    
  transition: transform 0.3s, box-shadow 0.3s;
  background-color: #fff;
}

#appLogo:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.app-name {
  font-size: 22px;
  font-weight: bold;
  color: white;
  font-family: 'Segoe UI', sans-serif;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.logo-container:hover .app-name {
  color: #6c63ff; 
}
.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  cursor: pointer;
}

.profile input {
  background: transparent;
  border: none;
  border-bottom: 1px solid #aaa;
  color: white;
  outline: none;
  font-size: 16px;
}

.main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.card {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 20px;
}

.qr-text-preview {
  width: 100%;
  margin-top: 15px;
}

.qr-text-preview label {
  font-size: 14px;
  opacity: 0.8;
}

.qr-text-preview textarea {
  width: 100%;
  height: 90px;
  margin-top: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 10px;
  color: white;
  resize: none;
  outline: none;
  font-size: 14px;
}


textarea {
  width: 100%;
  height: 140px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 15px;
  color: white;
  resize: none;
  outline: none;
}

button {
  background: var(--primary);
  border: none;
  padding: 14px;
  width: 100%;
  color: white;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 12px;
  transition: 0.3s;
}

button:hover {
  opacity: 0.85;
}

.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-preview img {
  width: 220px;
  height: 220px;
  background: white;
  padding: 10px;
  border-radius: 12px;
}

.history {
  margin-top: 20px;
}
.history h3 {
  margin-bottom: 10px;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  scroll-behavior: smooth;
}

.history-item img {
  width: 100%;
  border-radius: 10px;
  background: white;
  padding: 6px;
  cursor: pointer;
}
.history-item {
  position: relative;
  border-radius: 12px;
  padding: 6px;
  transition: 0.2s;
}

.history-item.selected {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.clear-history-btn {
  margin-top: 12px;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 10px;
  width: 100%;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  transition: 0.25s;
}

.clear-history-btn:hover {
  background: var(--primary);
  color: white;
}
.clear-history-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button {
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}
.history-item img {
  transition: all 0.3s ease;
}

.history-item:hover img {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}


.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.app-footer {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.2);
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

.app-footer p {
  margin: 3px 0;
}
.app-footer p a{
    color: #fff;
    text-decoration: none;
}

@media(max-width: 768px) {
  .main {
    grid-template-columns: 1fr;
  }
  .app-name{
    display: none;
  }
}

@media(max-width: 992px) {
  .main {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .qr-preview img {
    width: 180px;
    height: 180px;
  }

  .qr-text-preview textarea {
    height: 70px;
  }
  .app-name{
    display: none;
  }
}

@media(max-width: 480px) {
  body {
    padding: 10px;
  }

  .app {
    padding: 15px;
  }
  .app-name{
    display: none;
  }
  #appLogo {
    width: 40px;
    height: 40px;
  }

  .qr-preview img {
    width: 150px;
    height: 150px;
  }

  button {
    padding: 12px;
    font-size: 14px;
  }

  .qr-text-preview textarea {
    height: 60px;
    font-size: 13px;
  }

  .history-list {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
  }
}