.abr-scope {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.abr-scope *, .abr-scope *::before, .abr-scope *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.abr-scope {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.abr-scope .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.abr-scope header {
    text-align: center;
    margin-bottom: 50px;
    color: white;
    animation: fadeInDown 0.8s ease-out;
}

.abr-scope header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.abr-scope .subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Main Content */
.abr-scope main {
    animation: fadeInUp 0.8s ease-out;
}

.abr-scope .upload-section {
    margin-bottom: 60px;
}

.abr-scope .upload-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
}

.abr-scope .upload-card h2 {
    font-size: 1.75rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.abr-scope .help-text {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* File Input Styles */
.abr-scope .file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.abr-scope .file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.abr-scope .file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.abr-scope .file-label:hover {
    border-color: var(--primary-color);
    background: #f0f0ff;
    transform: translateY(-2px);
}

.abr-scope .file-label.drag-over {
    border-color: var(--primary-color);
    background: #f0f0ff;
    transform: scale(1.02);
}

.abr-scope .upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.abr-scope .file-label-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Preview Styles */
.abr-scope .preview-container {
    margin: 20px 0;
    text-align: center;
}

.abr-scope .preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    object-fit: contain;
}

/* Button Styles */
.abr-scope .btn-primary,
.abr-scope .btn-success,
.abr-scope .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 8px;
}

.abr-scope .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.abr-scope .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.abr-scope .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.abr-scope .btn-success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.abr-scope .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.abr-scope .btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.abr-scope .btn-secondary:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.abr-scope .btn-icon {
    width: 20px;
    height: 20px;
}

/* Spinner Animation */
.abr-scope .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.abr-scope .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Alert Styles */
.abr-scope .alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 20px;
    font-weight: 500;
}

.abr-scope .alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Result Section */
.abr-scope .result-section {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: slideInUp 0.5s ease-out;
}

.abr-scope .result-section h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.abr-scope .result-card {
    text-align: center;
}

.abr-scope .result-image-container {
    background: 
        repeating-conic-gradient(#f0f0f0 0% 25%, white 0% 50%) 
        50% / 20px 20px;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: inline-block;
}

.abr-scope .result-image {
    max-width: 100%;
    max-height: 600px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.abr-scope .result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.abr-scope .features-section {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
}

.abr-scope .features-section h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.abr-scope .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.abr-scope .feature-card {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background: var(--bg-light);
    transition: all 0.3s ease;
}

.abr-scope .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.abr-scope .feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.abr-scope .feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.abr-scope .feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How It Works Section */
.abr-scope .how-it-works {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
}

.abr-scope .how-it-works h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.abr-scope .steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.abr-scope .step {
    text-align: center;
    position: relative;
}

.abr-scope .step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
}

.abr-scope .step h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.abr-scope .step p {
    color: var(--text-secondary);
}

/* Footer */
.abr-scope footer {
    text-align: center;
    padding: 40px 20px;
    color: white;
    margin-top: 60px;
}

.abr-scope footer p {
    margin: 5px 0;
}

.abr-scope .footer-note {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .abr-scope {
        padding: 10px;
    }

    .abr-scope header h1 {
        font-size: 2rem;
    }

    .abr-scope .subtitle {
        font-size: 1rem;
    }

    .abr-scope .upload-card,
    .abr-scope .result-section,
    .abr-scope .features-section,
    .abr-scope .how-it-works {
        padding: 25px;
    }

    .abr-scope .features-grid,
    .abr-scope .steps-grid {
        grid-template-columns: 1fr;
    }

    .abr-scope .result-actions {
        flex-direction: column;
    }

    .abr-scope .result-actions a, .abr-scope .result-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .abr-scope header h1 {
        font-size: 1.75rem;
    }

    .abr-scope .file-label {
        padding: 40px 20px;
    }

    .abr-scope .upload-icon {
        width: 48px;
        height: 48px;
    }
}
