body {
    margin: 0;
    font-family: sans-serif;
    background: #E8DEF8;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #D0BCFF;
    color: black;
    padding: 15px;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}


.menu-popup {
    position: relative;
}

.menu-btn {
    background: none;
    color: black;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.menu-content {
    display: none;
    position: absolute;
    right: 0;
    background: #EADDFF;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    z-index: 1;
}

.menu-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 16px;
}

.menu-content a:hover {
    background-color: #eee;
}

.menu-popup.show .menu-content {
    display: block;
}

.container {
    padding: 20px;
}

label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

input,
select,
button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    font-size: 16px;
}

button {
    background: #6750A4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: white;
    margin-top: 15px;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

button:hover {
    background-color: #4f378b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.output-header {
    font-weight: bold;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.output-header div,
.license-entry div {
    flex: 1;
    word-break: break-word;
}

.license-entry {
  display: flex;
  flex-direction: column;
  background: #f5f0ff;
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  position: relative;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 6px;
  color: #888;
}

.entry-meta {
  font-size: 13px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.entry-meta .badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 12px;
}

.badge.expired {
  background: #ffe1e1;
  color: #d32f2f;
}

.badge.blocked {
  background: #ffe1e1;
  color: #d32f2f;
}

.badge.key {
  background: #e0e0e0;
  color: #888;
}

.badge.mrt {
  background: #E8DEF8;
  color: #6750A4;
}

.entry-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.entry-actions button {
  background: #6750a4;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.entry-actions button:hover {
  background-color: #4f378b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #D0BCFF;
    color: #000;
    padding: 12px 20px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
}

.input-icon {
    position: relative;
    margin-top: 10px;
}

.input-icon i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #6750A4;
    font-size: 16px;
}

.input-icon input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 10px 10px 36px;
    border: 2px solid #6750A4;
    border-radius: 8px;
    font-size: 16px;
    background-color: #f5f0ff;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-icon input:focus {
    border-color: #4f378b;
    box-shadow: 0 0 0 3px rgba(103, 80, 164, 0.2);
    outline: none;
}

select {
    border: 2px solid #6750A4;
    border-radius: 8px;
    background-color: #f5f0ff;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
    padding-right: 36px;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%236750A4' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

select:focus {
    border-color: #4f378b;
    box-shadow: 0 0 0 3px rgba(103, 80, 164, 0.2);
    outline: none;
}

#searchInput {
    border: 2px solid #6750A4;
    border-radius: 8px;
    background-color: #f5f0ff;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

#searchInput:focus {
    border-color: #4f378b;
    box-shadow: 0 0 0 3px rgba(103, 80, 164, 0.2);
    outline: none;
}

.success-banner {
    display: none;
    background-color: #d4edda;
    border-left: 6px solid #28a745;
    color: #155724;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.4s ease;
}

.banner-header {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.banner-header i {
    margin-right: 10px;
    font-size: 18px;
}

.banner-details {
    font-size: 15px;
    color: #155724;
}

.badge.used {
  background: #c8e6c9;
  color: #256029;
}

.badge.not-used {
  background: #f0f0f0;
  color: #555;
}

.license-entry button {
    background-color: #6750A4;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Mobile-only layout adjustments */
html {
  background: #e0e0e0;
}

body {
  max-width: 430px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  min-height: 100vh;
  height: auto;
}


/* iOS fullscreen-like behavior */
html, body {
  overscroll-behavior: none;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  touch-action: manipulation;
}
