/* ========================================
   NEW TOOLS - STYLING
   ======================================== */

/* Base Section Styling für alle neuen Tools */
#base64Section,
#boxShadowSection,
#breakpointSection,
#faviconSection,
#emojiSection {
  background: rgba(20, 20, 20, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 40px auto;
  padding: 20px;
  color: white;
  text-align: center;
}

#base64Section h2,
#boxShadowSection h2,
#breakpointSection h2,
#faviconSection h2,
#emojiSection h2 {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #fff;
}

/* ========================================
   BASE64 ENCODER/DECODER
   ======================================== */

.base64-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: "Courier New", monospace;
  resize: vertical;
  min-height: 100px;
  outline: none;
  box-sizing: border-box;
}

.base64-form textarea:focus {
  border-color: #2575fc;
  box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
}

.base64-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
  flex-wrap: wrap;
}

.base64-buttons button {
  flex: 1 1 200px;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: 0.3s ease;
}

.base64-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 117, 252, 0.6);
}

#base64Result {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  border-radius: var(--radius-md);
  padding: 15px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 60px;
  text-align: left;
}

/* ========================================
   BOX SHADOW GENERATOR
   ======================================== */

.shadow-preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}

.shadow-preview-box {
  width: 150px;
  height: 150px;
  background: white;
  border-radius: var(--radius-md);
  transition: box-shadow 0.1s ease;
}

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

.shadow-control {
  text-align: left;
}

.shadow-control label {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.shadow-control label span {
  float: right;
  color: #2575fc;
  font-weight: bold;
}

.shadow-control input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

.shadow-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  cursor: pointer;
}

.shadow-control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  cursor: pointer;
  border: none;
}

.shadow-control input[type="color"] {
  width: 60px;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.shadow-control input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

#shadowResult {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  border-radius: var(--radius-md);
  padding: 15px;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

/* ========================================
   BREAKPOINT CALCULATOR
   ======================================== */

.breakpoint-info {
  background: rgba(37, 117, 252, 0.1);
  border-left: 4px solid #2575fc;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  text-align: left;
}

.breakpoint-info h3 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #2575fc;
}

.breakpoint-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.breakpoint-info li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breakpoint-info li:last-child {
  border-bottom: none;
}

.breakpoint-info strong {
  color: #2575fc;
}

#breakpointGenerateBtn {
  padding: 12px 30px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: 0.3s ease;
  margin-bottom: 20px;
}

#breakpointGenerateBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 117, 252, 0.6);
}

#breakpointResult {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.85);
  color: #111;
  border-radius: var(--radius-md);
  padding: 15px;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  text-align: left;
  max-height: 500px;
  overflow-y: auto;
}

/* ========================================
   FAVICON GENERATOR
   ======================================== */

.favicon-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.favicon-form input[type="file"] {
  flex: 1 1 200px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid #ccc;
  font-family: var(--font-sans);
  background: white;
  color: #333;
}

.favicon-form button {
  flex: 0 0 auto;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: 0.3s ease;
}

.favicon-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.favicon-form button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 117, 252, 0.6);
}

.favicon-preview {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  min-height: 60px;
}

.favicon-downloads {
  margin-top: 20px;
}

.favicon-downloads h3 {
  font-family: var(--font-mono);
  margin-bottom: 15px;
}

.favicon-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 10px 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.favicon-download-link {
  color: #2575fc;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s ease;
}

.favicon-download-link:hover {
  color: #00d4ff;
  text-decoration: underline;
}

/* ========================================
   EMOJI PICKER
   ======================================== */

.emoji-search {
  margin-bottom: 20px;
}

.emoji-search input {
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-size: 1rem;
  outline: none;
}

.emoji-search input:focus {
  border-color: #2575fc;
  box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
}

.emoji-result {
  min-height: 30px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #2575fc;
}

.emoji-grid {
  text-align: left;
  max-height: 600px;
  overflow-y: auto;
  padding: 10px;
}

.emoji-category {
  margin-bottom: 25px;
}

.emoji-category-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #2575fc;
  margin-bottom: 10px;
  border-bottom: 2px solid rgba(37, 117, 252, 0.3);
  padding-bottom: 5px;
}

.emoji-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 5px;
}

.emoji-item {
  font-size: 2rem;
  cursor: pointer;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  user-select: none;
}

.emoji-item:hover {
  background: rgba(37, 117, 252, 0.2);
  transform: scale(1.3);
}

.emoji-item:active {
  transform: scale(1.1);
}

/* ========================================
   WEB IMAGE OPTIMIZER
   ======================================== */

#imageOptimizerSection {
  background: rgba(20, 20, 20, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 40px auto;
  padding: 20px;
  color: white;
  text-align: center;
}

#imageOptimizerSection h2 {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #fff;
}

.image-opt-info {
  background: rgba(37, 117, 252, 0.1);
  border-left: 4px solid #2575fc;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  text-align: left;
}

.image-opt-info p {
  margin: 0;
  font-size: 0.95rem;
}

/* Form Styling */
.image-opt-form {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.image-opt-form .form-group {
  margin-bottom: 20px;
  text-align: left;
}

.image-opt-form .form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.image-opt-form input[type="file"] {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid #ccc;
  background: white;
  color: #333;
  font-family: var(--font-sans);
  cursor: pointer;
}

.image-opt-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #ccc;
  background: white;
  color: #333;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'><path fill='gray' d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  padding-right: 35px;
}

.image-opt-form select:focus {
  outline: none;
  border-color: #2575fc;
  box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.1);
}

.image-opt-form input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

.image-opt-form input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  cursor: pointer;
}

.image-opt-form input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  cursor: pointer;
  border: none;
}

.image-opt-form small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

#imageOptBtn {
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}

#imageOptBtn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 117, 252, 0.6);
}

#imageOptBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Preview */
.image-opt-preview {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-box {
  width: 100%;
  max-width: 600px;
}

/* Results */
.image-opt-results {
  margin-top: 20px;
}

.optimization-results {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 25px;
  text-align: left;
}

.optimization-results h3 {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #2575fc;
  text-align: center;
}

.optimization-results h4 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #2575fc;
}

.result-preview {
  text-align: center;
  margin-bottom: 20px;
}

.result-stats {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 20px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.stat-value {
  font-weight: bold;
  color: #fff;
  font-size: 0.95rem;
}

.download-section {
  text-align: center;
  margin: 20px 0;
}

.download-btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #00c851, #007e33);
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 200, 81, 0.4);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 200, 81, 0.6);
}

.tips-section {
  background: rgba(37, 117, 252, 0.1);
  border-left: 4px solid #2575fc;
  border-radius: var(--radius-md);
  padding: 15px;
  margin-top: 20px;
}

.tips-section ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
}

.tips-section li {
  padding: 6px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Guidelines */
.image-opt-guidelines {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 25px;
  text-align: left;
}

.image-opt-guidelines h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-top: 15px;
  margin-bottom: 10px;
  color: #2575fc;
}

.image-opt-guidelines h3:first-child {
  margin-top: 0;
}

.image-opt-guidelines ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.image-opt-guidelines li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  line-height: 1.6;
}

.image-opt-guidelines li:last-child {
  border-bottom: none;
}

.image-opt-guidelines strong {
  color: #2575fc;
  font-weight: 600;
}

/* ========================================
   BULK PROCESSING ADDITIONS
   ======================================== */

/* Bulk Preview */
.bulk-preview {
  text-align: center;
}

.bulk-preview h3 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: #2575fc;
  margin-bottom: 10px;
}

.file-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 15px;
  text-align: left;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 10px;
}

.file-item {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.file-item:last-child {
  border-bottom: none;
}

/* Progress Bar */
.processing-status {
  text-align: center;
  padding: 30px 20px;
}

.processing-status h3 {
  font-family: var(--font-mono);
  margin-bottom: 20px;
  color: #2575fc;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 20px 0;
  border: 2px solid rgba(37, 117, 252, 0.3);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6a11cb, #2575fc, #00d4ff);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

#progressText {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2575fc;
  margin-top: 10px;
}

.download-btn-large {
  font-size: 1.1rem;
  padding: 16px 35px;
}

.status-row {
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  margin-top: 10px;
  padding-top: 10px;
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media screen and (max-width: 768px) {
  .shadow-controls {
    grid-template-columns: 1fr;
  }
  
  .emoji-container {
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  }
  
  .emoji-item {
    font-size: 1.8rem;
  }
  
   .image-opt-form {
    padding: 15px;
  }
  
  .optimization-results {
    padding: 15px;
  }
  
  .stat-row {
    flex-direction: column;
    gap: 5px;
  }
}

@media screen and (max-width: 480px) {
  .base64-buttons {
    flex-direction: column;
  }
  
  .base64-buttons button {
    width: 100%;
  }
  
  .favicon-form {
    flex-direction: column;
  }
  
  .favicon-form input,
  .favicon-form button {
    width: 100%;
  }
  
  .emoji-container {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }
  
  .emoji-item {
    font-size: 1.5rem;
    padding: 8px;
  }
  
  #base64Section,
  #boxShadowSection,
  #breakpointSection,
  #faviconSection,
  #emojiSection,
  #imageOptimizerSection {
    width: calc(100% - 20px);
    padding: 15px;
    margin: 10px auto 40px;
  }
  
  .download-btn {
    width: 100%;
    padding: 12px 20px;
  }
}