.remove-bg-wrapper {
    min-height: 100vh;
    padding: 20px;
}

.remove-bg-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Section */
.header-section {
    background: rgba(20, 25, 45, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.header-text {
    flex: 1;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.header-text p {
    font-size: 0.875rem;
    color: #8b92b0;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.tab-btn {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #8b92b0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.tab-btn.active {
    background: rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    color: #fff;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #8b92b0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    z-index: 10;
}

.checkbox-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Hide native checkbox but keep it functional */
.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkbox Container */
.checkbox-wrapper span {
    position: relative;
    padding-left: 26px; /* Space for the custom checkbox */
    display: inline-block;
}

/* The Box */
.checkbox-wrapper span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effect for the box */
.checkbox-wrapper:hover span::before {
    border-color: #667eea;
}

.checkbox-wrapper input[type="checkbox"]:checked + span::before {
    background: #667eea;
    border-color: #667eea;
}

/* The Checkmark */
.checkbox-wrapper span::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-60%) rotate(45deg);
    width: 6px;
    height: 6px;
    border: solid white;
    border-width: 0 2px 2px 0;
    opacity: 0;
    transition: all 0.2s ease;
}

/* Checked State - Show Checkmark */
.checkbox-wrapper input[type="checkbox"]:checked + span::after {
    opacity: 1;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

/* Left Panel */
.left-panel {
    background: rgba(20, 25, 45, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-title {
    font-size: 0.875rem;
    color: #fff;
    font-weight: 500;
}

.upload-info {
    font-size: 0.75rem;
    color: #8b92b0;
}

.file-info {
    font-size: 0.75rem;
    color: #667eea;
    margin-left: auto;
}


/* Upload Area */
.upload-area {
    background: rgba(10, 14, 39, 0.6);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    min-height: 270px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    --tw-shadow: 0 0 15px #00ffcc, 0 0 30px #00ffcc;
    box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
}

.upload-placeholder {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.placeholder-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
    position: relative;
    z-index: 5;
}
.join_group_remove_link {
    font-size: 1rem;
    font-weight: 600;
    padding: 8px;
    color: #b61074;
    background: #fff;
    border-radius: 24px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    text-decoration: none;
    display: inline-block;
}


.join_group_remove_link::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: 100px;
  background: linear-gradient(
    90deg,
    #3863ff,
    #d92eff,
    #ff3485,
    #ff6477,
    #ffd014
  );

  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.join_group_remove_link:hover {
    background: #b61074;
    color: #fff;
    transform: scale(1.05);
    animation-play-state: paused;
}

@keyframes blinkContinuous {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.1;
    }
}

.join_group_remove_img {
    width: 100%;
    max-width: 64px;
    height: auto;
}
.join_group_remove_text {
    font-size: 1.15rem !important; 
    font-weight: 600 !important;
    background: linear-gradient(
        90deg,
        #ff0080,
        #ff8c00,
        #ffd700,
        #00ff00,
        #00bfff,
        #8a2be2,
        #ff0080
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowText 3s linear infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes rainbowText {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}
.upload-placeholder h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
}

.upload-placeholder p {
    font-size: 0.875rem;
    color: #8b92b0;
    line-height: 1.6;
    max-width: 400px;
}

.link-text {
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
}

.choose-btn {
    padding: 12px 32px;
    background: #667eea;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.choose-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Loader */
.loader-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 20px;
}

.loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-section p {
    color: #8b92b0;
    font-size: 0.875rem;
}

/* Result Images */
.result-images {
    margin-top: 24px;
}

.image-comparison {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.compare-image {
    background: rgba(10, 14, 39, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.compare-image:hover,
.download-btn:hover,
.reset-action-btn:hover {
    --tw-shadow: 0 0 15px #00ffcc, 0 0 30px #00ffcc;
    box-shadow: 0 0 #0000, 0 0 #0000, var(--tw-shadow);
}

.image-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-header span:first-child {
    font-size: 0.875rem;
    color: #fff;
    font-weight: 500;
}

.image-size {
    font-size: 0.75rem;
    color: #8b92b0;
}

.image-container {
    padding: 8px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    object-fit: contain;
}

.transparent-bg {
    background-image: linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.05) 25%,
            transparent 25%
        ),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Progress Section */
.progress-section {
    margin-top: 20px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #8b92b0;
}

.progress-action {
    color: #10b981;
    font-weight: 500;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-percent {
    font-size: 0.875rem;
    color: #10b981;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

/* Right Panel */
.right-panel {
    background: rgba(20, 25, 45, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.action-header span:first-child {
    font-size: 0.875rem;
    color: #fff;
    font-weight: 500;
}

.action-count {
    font-size: 0.75rem;
    color: #8b92b0;
}

.download-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #10b981;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.download-btn:hover:not(.disabled) {
    transform: translateY(-2px);
}

.download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reset-action-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #8b92b0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.info-box {
    margin-top: 24px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.info-box p {
    font-size: 0.75rem;
    color: #8b92b0;
    line-height: 1.6;
    margin: 0;
}

.info-box strong {
    color: #fff;
}

/* Success Notification */
.success-notification {
    margin-top: 16px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

.success-notification.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.success-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #10b981;
}

.success-text {
    flex: 1;
}

.success-text strong {
    display: block;
    font-size: 0.875rem;
    color: #10b981;
    margin-bottom: 4px;
}

.success-text p {
    font-size: 0.75rem;
    color: #8b92b0;
    margin: 0;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .image-comparison {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
    }

    .remove-bg-wrapper {
        padding: 12px;
    }

    .left-panel,
    .right-panel {
        padding: 16px;
    }

    .upload-placeholder {
        padding: 20px;
    }

    .upload-placeholder h2 {
        font-size: 1.25rem;
    }
}
