/* Modern file upload area */
.file-upload-crop {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background-color: var(--background-color);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 400px;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    word-break: break-word;
    overflow-wrap: break-word;
}

.file-upload-crop * {
    word-break: break-word;
    overflow-wrap: break-word;
}

.file-upload-crop input[type="file"] {
    display: none;
}
.upload-icon-crop {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.upload-text-crop {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.upload-hint-crop {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
#rotateForm button, #downloadCropped {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
    width: 100%;
    max-width: 400px;
}
#rotateForm button:hover, #downloadCropped:hover {
    background: var(--accent-color);
}
#cropperContainer {
    margin-top: 24px;
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#cropperImage {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    display: block;
    margin: 0 auto;
    object-fit: contain;
}
.rotate-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.rotate-controls label {
    font-weight: 500;
    margin: 0 0.5rem;
}
.rotate-controls input[type="number"] {
    padding: 8px 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 80px;
}
@media (max-width: 600px) {
  .image-rotate-section {
    max-width: 100% !important;
    padding: 1rem !important;
    border-radius: 0.7rem !important;
  }
  #cropperContainer {
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    min-height: 250px !important;
  }
  #cropperImage {
    max-width: 100vw !important;
    max-height: 300px !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 0 auto !important;
    display: block !important;
  }
  .rotate-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    font-size: 1rem !important;
  }
  #rotateForm button, #downloadCropped {
    max-width: 100% !important;
    width: 100% !important;
    font-size: 1rem !important;
  }
  .file-upload-crop {
    max-width: 100% !important;
    width: 100% !important;
    padding: 1rem !important;
    font-size: 1rem !important;
  }
}