body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    background: #f5f5f5;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab {
    padding: 0.5rem 1rem;
    background: #98aeb2;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.tab.active {
    background: #007bff;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

label.required::after {
    content: " *";
    color: #dc3545;
}

textarea,
input,
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin: 0.5rem 0;
}

button:hover {
    background: #0056b3;
}

.result {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    word-break: break-all;
}

.error {
    color: #dc3545;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: #f8d7da;
    border-radius: 4px;
    display: none;
}

.success {
    color: #28a745;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: #d4edda;
    border-radius: 4px;
    display: none;
}

.section-title {
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #007bff;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th,
td {
    padding: 0.5rem;
    border: 1px solid #ddd;
}

th {
    background: #f8f9fa;
}

.items-table input {
    width: 100%;
    border: none;
    padding: 0.25rem;
}

.items-table input:focus {
    outline: 2px solid #007bff;
    border-radius: 2px;
}

.total-row {
    font-weight: bold;
}

.form-type-tabs {
    margin-bottom: 2rem;
}

.form-type {
    display: none;
}

.form-type.active {
    display: block;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    padding: 0;
    cursor: pointer;
    margin: 0;
}

.toggle-password:hover {
    background: none;
    color: #333;
}

button i {
    margin-right: 8px;
}

.error,
.success {
    display: flex;
    align-items: center;
    gap: 8px;
}

.error i {
    color: #dc3545;
}

.success i {
    color: #28a745;
}

button:hover i {
    transform: scale(1.1);
    transition: transform 0.2s;
}

#encryptedLink {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-button {
    background: none;
    border: none;
    color: #007bff;
    padding: 4px;
    cursor: pointer;
}

.copy-button:hover {
    background: none;
    color: #0056b3;
}

.error,
.success {
    display: none;
    align-items: center;
    gap: 8px;
}

.error.visible,
.success.visible {
    display: flex;
}

.tab i {
    margin-right: 8px;
}

.tab:hover i {
    transform: scale(1.1);
    transition: transform 0.2s;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

input[type="password"] {
    -webkit-text-security: disc !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: inherit !important;
}

textarea::-webkit-credentials-auto-fill-button,
textarea::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    height: 0;
    width: 0;
    margin: 0;
}

textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: inherit !important;
    background-color: white !important;
}

.encrypted-link {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
}

.encrypted-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

#encryptedLink {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

#encryptedLink .copy-button {
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.theme-toggle{
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.theme-toggle i {
  font-size: 1.2rem;
  transition: transform 0.5s ease;
  margin: 0;
}

.theme-toggle:hover i {
  transform: rotate(360deg);
}

:root {
  --background-color: #f5f5f5;
  --card-background: #ffffff;
  --text-color: #000000;
  --border-color: #ddd;
  --input-background: #ffffff;
}

[data-theme="dark"] {
  --background-color: #1a1a1a;
  --card-background: #2d2d2d;
  --text-color: #ffffff;
  --border-color: #404040;
  --input-background: #3d3d3d;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.card {
  background-color: var(--card-background);
}

input, textarea, .result {
  background-color: var(--input-background);
  color: var(--text-color);
  border-color: var(--border-color);
}