/* 
 * Image Background Remover CSS
 * Responsive styles for all devices
 */

/* Base styles and variables */
:root {
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;
    --space-3xl: 3rem;
    --space-4xl: 4rem;
    --space-5xl: 5rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --text-primary-color: #ffffff;
    --text-secondary-color: rgba(255, 255, 255, 0.8);
    --background-color: #000000;
    --primary-color: #4ade80;
    --primary-color-dark: #22c55e;
    --secondary-color: #3b82f6;
    --secondary-color-dark: #2563eb;
    --accent-color: #22c55e;
    --text-color: #ffffff;
    --text-color-light: rgba(255, 255, 255, 0.8);
    --card-background: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
    /* Typography Scale */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
}

/* Typography */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/desktop Bg image.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile background */
@media (max-width: 768px) {
    body {
        background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/mobile Bg image.webp');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }
    
    .center-header {
        flex-direction: column;
        gap: 8px;
    }
}

h1, h2, h3, h4, h5 {
    margin-top: 0;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color-dark);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.center-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.emoji-visible {
    font-size: 3.5rem;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
}

.back-button i {
    font-size: 16px;
    margin-right: var(--spacing-sm);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Header */
.page-header {
    text-align: center;
    padding: 80px 0 60px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

.breadcrumb span {
    color: var(--text-color-light);
}

/* Tool Section */
.tool-section {
    padding: var(--spacing-lg) 0 var(--spacing-xxl);
}

.remover-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 100%;
}

@media (min-width: 1024px) {
    .remover-layout {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-flow: row dense;
    }

    .preview-card, .result-card {
        grid-column: 1 / -1;
    }
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.card-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.tool-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.tool-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Upload Area */
.upload-container {
    padding: 30px;
    flex: 1;
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(74, 222, 128, 0.05);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.upload-area p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.upload-progress {
    padding: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: white;
    font-weight: 500;
    margin-bottom: 5px;
}

.progress-percentage {
    color: var(--primary-color);
    font-weight: 600;
}

/* Options Card */
.options-content {
    padding: 25px;
    flex: 1;
}

.options-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.option-group {
    margin-bottom: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.option-group:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.option-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: white;
    font-size: 1.05rem;
}

.option-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.2));
    border-radius: 10px;
    width: 40px;
    height: 40px;
    margin-right: 14px;
    font-size: 1.4rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.option-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.option-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.option-select option {
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border: none;
}

.option-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

.option-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.option-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
}

.checkbox-custom {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: white;
    vertical-align: middle;
    transition: var(--transition);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: var(--transition);
}

.checkbox-label input:checked + .checkbox-custom::after {
    opacity: 1;
}

/* Preview Card */
.preview-content {
    padding: var(--spacing-lg);
    flex: 1;
}

.preview-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.image-info {
    flex-grow: 1;
    min-width: 100px;
}

.info-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-color-light);
    margin-bottom: 4px;
}

.info-value {
    font-weight: 600;
}

.image-preview-container {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.02);
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.processing-controls {
    text-align: center;
}

/* Result Card */
.result-content {
    padding: var(--spacing-lg);
    flex: 1;
}

.success-message {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.success-message i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
}

.comparison-item {
    text-align: center;
}

.comparison-item h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.image-container {
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
}

.comparison-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.comparison-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.download-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
    min-width: 160px;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 44px;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-header {
    text-align: center;
    margin-bottom: 50px;
}

.faq-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
}

.faq-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0;
    flex: 1;
    padding-right: 20px;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    min-width: 20px;
    text-align: center;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 25px 30px;
}

.faq-answer p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header {
        padding: 60px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .emoji-visible {
        font-size: 2.5rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .card-header,
    .upload-container,
    .options-content,
    .preview-content,
    .result-content {
        padding: 20px;
    }
    
    .back-button {
        top: 20px;
        left: 20px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .tool-name {
        font-size: 1.5rem;
    }
    
    .tool-icon {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    .center-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .download-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .download-options .btn {
        width: 100%;
    }
    
    .features-section,
    .faq {
        padding: 60px 0;
    }
    
    .section-title,
    .faq-header h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .faq-question {
        padding: 20px 25px;
    }
    
    .faq-item.active .faq-answer {
        padding: 20px 25px;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .emoji-visible {
        font-size: 2rem;
    }
    
    .card-header,
    .upload-container,
    .options-content,
    .preview-content,
    .result-content {
        padding: 15px;
    }
    
    .tool-name {
        font-size: 1.3rem;
    }
    
    .features-section,
    .faq {
        padding: 40px 0;
    }
    
    .section-title,
    .faq-header h2 {
        font-size: 1.8rem;
    }
    
    .feature-card {
        padding: 20px 15px;
    }
    
    .faq-question {
        padding: 15px 20px;
    }
    
    .faq-item.active .faq-answer {
        padding: 15px 20px;
    }
    
    /* Touch optimizations */
    .btn, 
    .option-select,
    .checkbox-label,
    .faq-question {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .checkbox-label {
        padding: 4px 0;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .upload-area h3 {
        font-size: 1.125rem;
    }
    
    .upload-area p {
        font-size: 0.875rem;
    }
}

/* Accessibility improvements */
.btn:focus, 
.option-select:focus, 
.option-slider:focus, 
.checkbox-label input:focus + .checkbox-custom {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.upload-area:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Print styles */
@media print {
    .back-button, 
    .remover-layout, 
    .features-section, 
    .faq {
        display: none;
    }

    .page-header {
        border-bottom: none;
        padding: 0;
    }
}