/**
 * Gemini Watermark Remover - Styles
 * Modern, dark-themed UI with smooth animations
 */

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #121212;
    --color-surface: #1e1e1e;
    --color-surface-hover: #252525;
    --color-primary: #4ade80;
    --color-primary-hover: #22c55e;
    --color-text: #e0e0e0;
    --color-text-muted: #888;
    --color-text-dim: #666;
    --color-border: #333;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--color-bg) 0%, #1a1a1a 100%);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 900px;
    padding: var(--spacing-lg) var(--spacing-md);
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.icon-sparkle {
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ===== Drop Zone ===== */
.drop-zone {
    border: 3px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    background: var(--color-surface);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.drop-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: var(--spacing-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.drop-text {
    font-size: 1.25rem;
    color: var(--color-text);
    margin: 0;
}

.drop-subtext {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

#fileInput {
    display: none;
}

/* ===== Progress Bar ===== */
.progress-container {
    display: none;
    width: 100%;
    background: var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: var(--spacing-md) 0;
    height: 32px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    width: 0%;
    transition: width var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* ===== Log Area ===== */
.log-area {
    display: none;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--color-text-dim);
    background: #0a0a0a;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    max-height: 120px;
    overflow-y: auto;
    margin: var(--spacing-md) 0;
    border: 1px solid var(--color-border);
}

.log-line {
    margin: 2px 0;
    padding: 2px 0;
}

.log-time {
    color: var(--color-text-dim);
    margin-right: var(--spacing-xs);
}

.log-error {
    color: var(--color-error);
}

.log-warn {
    color: var(--color-warning);
}

/* ===== Result Area ===== */
.result-area {
    display: none;
    margin-top: var(--spacing-lg);
    background: var(--color-surface);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.preview-container {
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.preview-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* ===== Comparison Slider ===== */
.comparison-container {
    display: none;
    margin: var(--spacing-lg) 0;
}

.comparison-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-images {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.comparison-after {
    width: 100%;
    display: block;
}

.comparison-before-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    border-right: 3px solid var(--color-primary);
}

.comparison-before {
    width: auto;
    height: 100%;
    display: block;
}

.comparison-slider {
    width: 100%;
    margin: var(--spacing-sm) 0;
    cursor: pointer;
}

.comparison-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding: 0 var(--spacing-xs);
}

/* ===== Buttons ===== */
.action-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--color-primary);
    color: #000;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: #444;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.2rem;
}

/* ===== Error Message ===== */
.error-message {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--color-error);
    color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.error-message.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.error-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.error-icon {
    font-size: 1.5rem;
}

.error-text {
    flex: 1;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.error-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== Footer ===== */
.footer {
    margin-top: var(--spacing-xl);
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.footer-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xs);
}

.footer-text a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-text a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.footer-note {
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .drop-zone {
        padding: var(--spacing-lg);
        min-height: 200px;
    }
    
    .drop-icon {
        font-size: 3rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}
