/* Upload Page Styles */
.upload-container {
    background-color: transparent;
    border-radius: 0px;
    overflow: hidden;
    margin-bottom: 0px;
    transition: all 0.3s ease;
    border: none;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    position: relative;
    background: transparent;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    transition: all 0.3s ease;
    padding: 20px 20px;
    border-radius: 2px;
    background-color: transparent;
    border: 2px dashed #d0d0d0;
    opacity: 1;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-content:hover {
    border: 2px dashed #7953db;
    box-shadow: 0 0 10px rgba(121, 83, 219, 0.1);
}

.upload-icon {
    font-size: 24px;
    color: white;
    margin-bottom: 25px;
    transition: transform 0.3s ease, color 0.3s ease;
    background-color: #7953db;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon i {
    font-size: 32px;
}

.upload-content:hover .upload-icon {
    transform: translateY(-5px);
}

.upload-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.upload-content p {
    font-size: 16px;
    color: var(--tool-description-color);
    margin-bottom: 25px;
}

.upload-info {
    display: none;
}

/* Format tags */
.format-tags {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    justify-content: center;
}

.format-tag {
    background-color: transparent;
    color: #666;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #eee;
}

[data-theme="dark"] .format-tag {
    background-color: transparent;
    color: #aaa;
    border: 1px solid #333;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-button {
    background-color: #7953db;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.upload-button:hover {
    background-color: #6a44cc;
}

/* Upload Preview Styles */
.upload-preview {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 1;
    text-align: center;
    padding: 20px;
}

.preview-container {
    width: 100%;
    max-width: 450px;
    height: 280px;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 25px auto;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid #eee;
}

.preview-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(121, 83, 219, 0.05) 0%, rgba(121, 83, 219, 0.05) 100%);
    z-index: 0;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.preview-info {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background-color: transparent;
    padding: 20px;
    border-radius: 10px;
    margin: 0 auto;
    text-align: center;
}

.file-details {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
    flex-wrap: wrap;
}

.file-name {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.file-size {
    font-size: 15px;
    color: var(--tool-description-color);
    background-color: rgba(121, 83, 219, 0.1);
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 500;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.preview-actions button {
    flex: 1;
    max-width: 200px;
    min-width: 120px;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.preview-actions .secondary-btn {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
}

.preview-actions .secondary-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.preview-actions .primary-btn {
    background-color: #7953db;
    color: white;
    border: none;
}

.preview-actions .primary-btn:hover {
    background-color: #6a44cc;
}

/* Rotate Image Tool Specific Styles */
.cropper-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.cropper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    min-height: 600px;
    height: auto;
}

/* Left Panel - Image Preview */
.preview-panel {
    flex: 1.2;
    min-width: 350px;
    padding: 30px;
    border-right: 1px solid var(--card-border);
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(121, 83, 219, 0.02) 100%);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.cropper-image-container {
    width: 100%;
    height: 450px;
    background: linear-gradient(135deg, var(--background-color) 0%, rgba(121, 83, 219, 0.03) 100%);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.cropper-image-container:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.cropper-image-container img,
.cropper-image-container canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* Rotation Indicator */
.rotation-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(121, 83, 219, 0.9), rgba(157, 109, 255, 0.9));
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(121, 83, 219, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
}

.image-label {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(121, 83, 219, 0.9), rgba(157, 109, 255, 0.9));
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(121, 83, 219, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 10;
}

.image-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(121, 83, 219, 0.02) 0%, rgba(157, 109, 255, 0.02) 100%);
    border-radius: 16px;
    border: 1px solid rgba(121, 83, 219, 0.1);
}

.info-item {
    background-color: var(--background-color);
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-label {
    font-size: 13px;
    color: var(--tool-description-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-label i {
    font-size: 14px;
    opacity: 0.8;
}

.info-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.crop-badge {
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 16px;
    display: inline-block;
    width: fit-content;
}

/* Right Panel - Rotation Options */
.options-panel {
    flex: 1;
    min-width: 320px;
    padding: 0;
    background-color: var(--card-bg);
    overflow-y: auto;
    overflow-x: hidden;
    height: 600px;
    max-height: calc(100vh - 200px);
    scrollbar-width: thin;
    scrollbar-color: rgba(121, 83, 219, 0.3) transparent;
}

.options-panel::-webkit-scrollbar {
    width: 6px;
}

.options-panel::-webkit-scrollbar-track {
    background: transparent;
}

.options-panel::-webkit-scrollbar-thumb {
    background-color: rgba(121, 83, 219, 0.3);
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.options-panel::-webkit-scrollbar-thumb:hover {
    background-color: rgba(121, 83, 219, 0.5);
}

.options-container {
    max-width: 100%;
    padding: 25px;
    min-height: 100%;
    padding-bottom: 50px;
}

.options-container h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.options-description {
    font-size: 14px;
    color: var(--tool-description-color);
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.9;
}

.option-group {
    margin-bottom: 25px;
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.option-group>label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
    letter-spacing: 0.2px;
}

/* Quick Rotation Controls */
.quick-rotation-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.rotation-btn {
    background-color: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-color);
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    font-size: 14px;
}

.rotation-btn:hover {
    border-color: #7953db;
    background-color: rgba(121, 83, 219, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(121, 83, 219, 0.2);
}

.rotation-btn.active {
    background-color: #7953db;
    border-color: #7953db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(121, 83, 219, 0.3);
}

.rotation-btn i {
    font-size: 18px;
    margin-bottom: 2px;
}

/* Rotation Control */
.rotation-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.rotation-slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.rotation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7953db;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(121, 83, 219, 0.3);
}

.rotation-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7953db;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(121, 83, 219, 0.3);
}

.rotation-display {
    background-color: var(--card-bg);
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid var(--card-border);
    font-weight: 600;
    color: var(--text-color);
    min-width: 60px;
    text-align: center;
}

/* Background Controls */
.background-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.background-option {
    display: flex;
    align-items: center;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 100%;
}

.radio-option:hover {
    background-color: rgba(121, 83, 219, 0.05);
}

.radio-option input[type="radio"] {
    margin: 0;
}

.radio-option input[type="color"] {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background-color: #7953db;
    color: white;
}

.action-btn.primary:hover {
    background-color: #6a44cc;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
}

.action-btn.secondary:hover {
    background-color: var(--card-border);
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Quality Control Styles */
.quality-control {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.quality-slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7953db;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(121, 83, 219, 0.3);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7953db;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(121, 83, 219, 0.3);
}

.quality-display {
    background-color: var(--card-bg);
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid var(--card-border);
    font-weight: 600;
    color: var(--text-color);
    min-width: 60px;
    text-align: center;
}

.option-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--card-border);
    border-radius: 5px;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: border-color 0.3s ease;
}

.option-input:focus {
    border-color: #7953db;
    outline: none;
}

.option-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--card-border);
    border-radius: 5px;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

.option-select:focus {
    border-color: #7953db;
    outline: none;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.action-buttons button {
    flex: 1;
    padding: 12px;
}

/* Enhanced Button Styles */
.enhanced-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.enhanced-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.primary-btn.enhanced-btn {
    background-color: #7953db;
    color: white;
}

.primary-btn.enhanced-btn:hover:not(:disabled) {
    background-color: #6a44cc;
    transform: translateY(-1px);
}

.secondary-btn.enhanced-btn {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
}

.secondary-btn.enhanced-btn:hover:not(:disabled) {
    background-color: var(--card-border);
    transform: translateY(-1px);
}

/* Help Text */
.help-text {
    font-size: 12px;
    color: var(--tool-description-color);
    margin: 0;
    padding: 8px 12px;
    background-color: rgba(121, 83, 219, 0.05);
    border-radius: 6px;
    border-left: 3px solid #7953db;
    line-height: 1.4;
}

/* Drag and Drop Highlight */
.upload-area.drag-over .upload-content {
    border: 2px dashed #7953db;
    background-color: rgba(121, 83, 219, 0.03);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.upload-area.drag-over .upload-icon {
    transform: translateY(-5px) scale(1.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .cropper-wrapper {
        flex-direction: column;
        height: auto;
        max-height: none;
    }

    .preview-panel {
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        overflow: visible;
        max-height: none;
    }

    .options-panel {
        max-height: 500px;
        overflow-y: auto;
    }

    .options-container {
        max-width: 100%;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .upload-area {
        padding: 25px;
    }

    .upload-content {
        padding: 20px;
    }

    .upload-icon {
        font-size: 56px;
    }

    .upload-content h3 {
        font-size: 24px;
    }

    .preview-panel,
    .options-panel {
        padding: 20px;
    }

    .image-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .info-item {
        min-width: auto;
    }

    .quick-rotation-controls {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .background-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .quick-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .upload-area {
        padding: 20px 15px;
    }

    .upload-content {
        padding: 15px;
    }

    .upload-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    .upload-content h3 {
        font-size: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .enhanced-btn {
        padding: 12px 20px !important;
        margin-bottom: 5px;
    }
}

/* Notification Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.notification {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.notification.success {
    border-left-color: #2ecc71;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification.warning {
    border-left-color: #f39c12;
}

.notification.info {
    border-left-color: #3498db;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-content i {
    font-size: 18px;
}

.notification.success .notification-content i {
    color: #2ecc71;
}

.notification.error .notification-content i {
    color: #e74c3c;
}

.notification.warning .notification-content i {
    color: #f39c12;
}

.notification.info .notification-content i {
    color: #3498db;
}

.notification-content span {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--tool-description-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 12px;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.notification.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}