.image-rotate-hidden {
    display: none !important;
}

.image-rotate-tool-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.image-rotate-tool-container>h2 {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 500;
}

.image-rotate-progress-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    margin-top: 10px;
    padding: 0 10px;
}

.image-rotate-thumbnail-loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f0f0f0;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: image-rotate-spinner-anim 1s linear infinite;
    margin-right: 15px;
}

.image-rotate-progress-container {
    flex-grow: 1;
    height: 20px;
    background-color: #ecf0f1;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.image-rotate-progress-bar-inner {
    height: 100%;
    width: 0%;
    background-color: #3498db;
    transition: width 0.1s linear;
    border-radius: 10px;
}

.image-rotate-progress-percentage-text {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
    margin-left: 10px;
    min-width: 40px;
    text-align: left;
}

.image-rotate-animated-loading-text {
    text-align: center;
    font-size: 16px;
    color: #555;
    height: 20px;
    /* Reserve space */
}

.image-rotate-start-area {
    border: 2px dashed #3498db;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

.image-rotate-tool-container .image-rotate-start-area:hover {
    border-color: #2980b9;
    background: rgba(52, 152, 219, 0.05);
}

.image-rotate-file-input {
    display: none;
}

.image-rotate-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-grow: 1;
    padding: 40px 20px;
}

.image-rotate-drop-zone p {
    font-size: 17px;
    text-align: center;
    margin-top: 0;
}

.image-rotate-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 10px;
}

.image-rotate-loading-overlay .image-rotate-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
}

.image-rotate-spinner {
    animation: image-rotate-spinner-anim 1.5s linear infinite;
    width: 32px;
    height: 32px;
}

.image-rotate-btn .image-rotate-spinner {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    margin-right: 8px;
}

.image-rotate-spinner .path {
    stroke: #2c3e50;
    stroke-linecap: round;
    animation: image-rotate-dash-anim 1.5s ease-in-out infinite;
}

@keyframes image-rotate-spinner-anim {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes image-rotate-dash-anim {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.image-rotate-spinner-container span {
    font-size: 18px;
    margin-top: 15px;
    font-weight: 500;
}

.image-rotate-orientation-options {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.image-rotate-orientation-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #333;
    cursor: pointer;
}

.image-rotate-orientation-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.image-rotate-editor {
    margin-top: 30px;
}

.image-rotate-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, 150px);
    justify-content: center;
    gap: 15px;
    position: relative;
}

.image-rotate-thumbnail {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.image-rotate-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease-in-out;
}

.image-rotate-page-number {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.image-rotate-thumbnail-controls {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
    pointer-events: none;
}

.image-rotate-thumbnail:hover .image-rotate-thumbnail-controls,
.image-rotate-thumbnail-controls.mobile-visible {
    opacity: 1;
}

.image-rotate-thumbnail-btn {
    pointer-events: auto;
    background-color: rgba(44, 62, 80, 0.7);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    padding: 0;
    box-sizing: border-box;
}

.image-rotate-thumbnail-btn svg {
    width: 18px;
    height: 18px;
}

.image-rotate-thumbnail-btn[data-action="copy"] svg {
    width: 16px;
    height: 16px;
}

/* Prevent theme hover/focus effects */
.image-rotate-tool-container .image-rotate-thumbnail-btn:hover,
.image-rotate-tool-container .image-rotate-thumbnail-btn:focus {
    background-color: rgba(44, 62, 80, 0.7);
    color: white;
    box-shadow: none;
    outline: none;
    border: none;
}

.image-rotate-tool-container .image-rotate-thumbnail-btn:active {
    transform: scale(0.95);
}

.image-rotate-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 11;
    padding: 15px 10px;
    margin-bottom: 20px;
}

.image-rotate-main-buttons {
    display: flex;
    gap: 10px;
}

.image-rotate-btn {
    padding: 6px 13px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.image-rotate-clear-btn,
  .image-rotate-clear-btn:active,
  .image-rotate-clear-btn:focus,
  .image-rotate-clear-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

#image-rotate-apply-all-rotation {
    width: 100px;
}

.image-rotate-primary-btn {
    background: #1f6a9c;
    color: white;
}

/* Prevent theme hover/focus effects */
.image-rotate-tool-container .image-rotate-clear-btn:hover,
.image-rotate-tool-container .image-rotate-clear-btn:focus {
    background: #ecf0f1;
    color: #2c3e50;
    box-shadow: none;
    outline: none;
    border: none;
}

.image-rotate-tool-container .image-rotate-btn:active {
    transform: scale(0.97);
}

.image-rotate-tool-container .image-rotate-primary-btn:hover,
.image-rotate-tool-container .image-rotate-primary-btn:focus {
    background: #1f6a9c;
    color: white;
    box-shadow: none;
    outline: none;
    border: none;
}

.image-rotate-result {
    margin-top: 30px;
    text-align: center;
}

.image-rotate-success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-rotate-success-icon {
    width: 50px;
    height: 50px;
    color: #27ae60;
    margin-bottom: 15px;
}

.image-rotate-result-title {
    margin: 0 0 20px;
    color: #2c3e50;
}

.image-rotate-result-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.image-rotate-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.image-rotate-close-fullscreen {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(44, 62, 80, 0.8);
    border: none;
    padding: 10px;
    border-radius: 50%;
    z-index: 1001;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

/* Prevent theme hover/focus effects */
.image-rotate-tool-container .image-rotate-close-fullscreen:hover,
.image-rotate-tool-container .image-rotate-close-fullscreen:focus {
    background-color: rgba(44, 62, 80, 0.8);
    color: white;
    box-shadow: none;
    outline: none;
    border: none;
}

.image-rotate-tool-container .image-rotate-close-fullscreen:active {
    transform: scale(0.95);
}

#image-rotate-fullscreen-img {
    max-inline-size: 90%;
    max-block-size: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease-in-out;
}

.image-rotate-fullscreen-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.8);
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.image-rotate-slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-rotate-slider-group label {
    font-weight: 500;
}

.image-rotate-slider-group input[type="range"] {
    width: 200px;
}

.image-rotate-slider-group span {
    min-width: 35px;
    text-align: right;
    font-family: monospace;
    font-size: 16px;
}

.image-rotate-fullscreen-buttons {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .image-rotate-fullscreen-controls {
        flex-direction: column;
        width: 90%;
        padding: 15px;
    }
    
    #image-rotate-apply-all-rotation {
        width: auto;
    }
}

.faq-list {
    margin-top: 1rem;
}

.faq-list dt {
    font-weight: 500;
    font-size: 1.1em;
}

.faq-list dd {
    margin-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

@media (max-width: 768px) {
    .image-rotate-tool-container {
        padding-left: 0;
        padding-right: 0;
        margin: 0 auto 60px;
        box-shadow: none;
        border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        border-radius: 0;
    }

    .image-rotate-thumbnails {
        grid-template-columns: repeat(auto-fit, 145px);
    }

    .image-rotate-thumbnail {
        width: 145px;
        height: 145px;
    }

    .image-rotate-actions {
        flex-direction: column;
        padding: 10px 5px;
        gap: 10px;
    }

    .image-rotate-btn {
        padding: 9px;
    }

    .image-rotate-thumbnail-controls {
        opacity: 1;
    }

    .image-rotate-tool-container h2 {
        font-size: 1.5rem;
    }
}