/* Converter Form Container */
.converter-form {
  background: #c0c0c0;
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 1px 1px 0 #000;
}

/* Segmented Control */
.segmented-control {
  display: flex;
  margin-bottom: 20px;
  background: #c0c0c0;
  padding: 3px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}

.segmented-control input[type="radio"] {
  display: none;
}

.segmented-control label {
  flex: 1;
  padding: 6px 15px;
  text-align: center;
  cursor: pointer;
  margin-right: 3px;
  font-size: 0.85rem;
  font-weight: normal;
  background: #c0c0c0;
  color: #00f;
  text-decoration: underline;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
}

.segmented-control label:last-of-type {
  margin-right: 0;
}

.segmented-control input[type="radio"]:checked + label {
  background: #c0c0c0;
  color: #000;
  text-decoration: none;
  font-weight: normal;
  border: 2px solid;
  border-color: #000 #fff #fff #000;
  padding: 7px 15px 5px 16px;
}

.segmented-control label:hover {
  background: #d4d0c8;
}

.segmented-control input[type="radio"]:checked + label:hover {
  background: #c0c0c0;
}

/* Form Sections */
.form-section {
  margin-bottom: 15px;
}

.form-section h2 {
  font-size: 1.2rem;
  color: #000;
  margin-bottom: 5px;
  font-weight: bold;
}

/* File Upload */
.file-upload-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 10px 15px;
  cursor: pointer;
  font-family: Verdana, sans-serif;
  font-size: 0.9rem;
  gap: 10px;
}

.file-upload-label:hover {
  background: #d4d0c8;
}

.file-upload-label:active {
  border-color: #808080 #fff #fff #808080;
  padding: 11px 14px 9px 16px;
}

.file-upload-text {
  flex: 1;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-upload-button {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 4px 12px;
  font-weight: bold;
  min-width: 80px;
  text-align: center;
}

.file-upload-label:active .file-upload-button {
  border-color: #000 #fff #fff #000;
  padding: 5px 11px 3px 13px;
}

.file-input {
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.85rem;
  padding: 5px;
  width: 100%;
  position: relative;
  opacity: 1;
  left: 0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  background: #fff;
}

.file-label {
  display: none;
}

.file-icon {
  display: none;
}

/* Text Area */
.html-textarea {
  width: 100%;
  padding: 5px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  resize: vertical;
  background: #fff;
}

.html-textarea:focus {
  outline: none;
  background: #fff;
}

/* URL Input */
.url-input {
  width: 100%;
  padding: 5px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  background: #fff;
}

.url-input:focus {
  outline: none;
  background: #fff;
}

/* Divider */
.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  border: none;
  padding: 0;
}

.divider::before,
.divider::after {
  display: none;
}

.divider span {
  background: transparent;
  padding: 0;
  color: #000;
  font-weight: bold;
  position: static;
  transform: none;
  border: none;
  text-transform: none;
  font-size: 1rem;
}

/* Image Previews */
.image-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
  padding: 10px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  min-height: 100px;
}

.image-previews:empty::before {
  content: 'No images selected';
  display: block;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  padding: 40px 0;
  grid-column: 1 / -1;
}

.preview-item {
  position: relative;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 8px;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.preview-item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: block;
  background: #fff;
  border: 1px solid #ccc;
}

.preview-filename {
  font-size: 0.7rem;
  color: #000;
  margin-top: 5px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px;
}

.remove-preview-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.remove-preview-btn:hover {
  background: #d4d0c8;
}

.remove-preview-btn:active {
  border-color: #000 #fff #fff #000;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Submit Button */
.form-actions {
  text-align: left;
  margin-top: 15px;
}

.submit-btn {
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: normal;
  cursor: pointer;
  text-transform: none;
  font-family: Verdana, Arial, sans-serif;
  letter-spacing: 0;
}

.submit-btn:hover {
  background: #d4d0c8;
  color: #000;
}

.submit-btn:active {
  border-color: #000 #fff #fff #000;
}

/* Auth Forms */
.auth-form {
  max-width: 400px;
  margin: 0 auto;
}

.auth-form .form-group {
  margin-bottom: 15px;
}

.auth-form .form-label {
  display: block;
  font-size: 0.85rem;
  color: #000;
  margin-bottom: 5px;
  font-weight: normal;
}

.auth-form .form-input {
  width: 100%;
  padding: 6px 8px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-family: Verdana, Arial, sans-serif;
  font-size: 0.85rem;
  background: #fff;
  box-sizing: border-box;
}

.auth-form .form-input:focus {
  outline: none;
  background: #ffffcc;
}

.auth-form .checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-form .form-checkbox {
  width: 16px;
  height: 16px;
}

.auth-form .checkbox-label {
  margin-bottom: 0;
  cursor: pointer;
}

.auth-form .field-hint {
  font-size: 0.75rem;
  color: #666;
  font-style: italic;
}

.auth-form .form-description {
  font-size: 0.85rem;
  color: #333;
  margin-bottom: 15px;
}

.btn {
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: normal;
  cursor: pointer;
  font-family: Verdana, Arial, sans-serif;
}

.btn:hover {
  background: #d4d0c8;
}

.btn:active {
  border-color: #000 #fff #fff #000;
}

.btn-primary {
  background: #c0c0c0;
  min-width: 120px;
}

.btn-danger {
  background: #ffcccc;
  color: #800000;
}

.btn-danger:hover {
  background: #ffaaaa;
}

/* Auth Links */
.auth-links {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px solid;
  border-top-color: #808080;
  text-align: center;
}

.auth-link {
  display: inline-block;
  margin: 5px 10px;
  color: #00f;
  text-decoration: underline;
  font-size: 0.85rem;
}

.auth-link:hover {
  color: #000080;
}

/* Settings Sections */
.settings-section {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #a0a0a0;
}

.settings-section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: #000;
  margin-bottom: 10px;
  padding-bottom: 5px;
}

.section-hint {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 10px;
}

.tier-display {
  padding: 10px;
  background: #d0d0d0;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}

.current-tier-badge {
  display: inline-block;
  padding: 4px 12px;
  font-weight: bold;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.current-tier-badge.free {
  background: #808080;
  color: #fff;
}

.current-tier-badge.paid {
  background: #ffd700;
  color: #000;
}

.tier-info {
  font-size: 0.8rem;
  color: #333;
  margin: 0;
}

/* Danger Zone */
.danger-zone {
  margin-top: 30px;
  padding: 15px;
  background: #fff0f0;
  border: 2px solid;
  border-color: #ff0000;
}

.danger-zone .section-title.danger {
  color: #800000;
}

.danger-text {
  font-size: 0.8rem;
  color: #800000;
  margin-bottom: 10px;
}

.pending-notice {
  font-size: 0.8rem;
  color: #806000;
  background: #ffffcc;
  padding: 8px;
  border: 1px solid #cccc00;
  margin-top: 5px;
}

.back-link {
  color: #00f;
  text-decoration: underline;
  font-size: 0.85rem;
}

.back-link:hover {
  color: #000080;
}

/* Full width buttons */
.btn-full {
  width: 100%;
  display: block;
  text-align: center;
}

/* OAuth Section */
.oauth-divider {
  text-align: center;
  margin: 25px 0 20px;
  position: relative;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.oauth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #808080;
  box-shadow: 0 1px 0 #fff;
}

.oauth-divider span {
  position: relative;
  background: #c0c0c0;
  padding: 0 15px;
  color: #555;
  font-size: 0.85rem;
  text-transform: lowercase;
}

.oauth-buttons {
  max-width: 400px;
  margin: 0 auto;
}

.btn-oauth {
  background: #fff;
  color: #000;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: normal;
  cursor: pointer;
  font-family: Verdana, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-shadow: 1px 1px 0 #000;
}

.btn-oauth:hover {
  background: #f5f5f5;
}

.btn-oauth:active {
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.google-icon {
  flex-shrink: 0;
}

/* Alert Messages */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 2px solid;
  font-size: 0.85rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.alert-error {
  background: #fff0f0;
  border-color: #c00000;
  color: #800000;
}

.alert-success {
  background: #f0fff0;
  border-color: #008000;
  color: #006000;
}

.alert-warning {
  background: #ffffd0;
  border-color: #c0c000;
  color: #606000;
}

.alert-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-title {
  font-weight: bold;
  margin: 0 0 8px 0;
}

.alert-message {
  margin: 0;
}

.alert-list {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

.alert-list li {
  margin-bottom: 4px;
}

.alert-list li:last-child {
  margin-bottom: 0;
}

