/* WebP Converter Styles - Enhanced Version */ :root { --primary-color: #0055B8; --primary-hover: #0066CC; --surface-color: #ffffff; --background-color: #f0f0f0; --text-color: #333333; --text-secondary: #6A6A6ADB; --border-color: #cccccc; --shadow-color: rgba(0, 0, 0, 0.1); --success-color: #28a745; --drop-hover: #000000; --transition-speed: 0.3s; --border-radius: 10px; --font-family: Arial, sans-serif; } /* Dark Mode Variables */ @media (prefers-color-scheme: dark) { :root { --primary-color: #0066CC; --primary-hover: #0077e6; --surface-color: #333333; --background-color: #222222; --text-color: #eeeeee; --text-secondary: #aaaaaa; --border-color: #555555; --shadow-color: rgba(0, 0, 0, 0.3); --drop-hover: #0055B8; } } .webp-converter { font-family: var(--font-family); display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; background-color: var(--background-color); flex-direction: column; padding: 20px 0; transition: background-color var(--transition-speed) ease; } .webp-converter h1 { color: var(--text-color); font-size: x-large; margin: 0 0 20px; transition: color var(--transition-speed) ease; } .webp-converter .container { text-align: center; background-color: var(--surface-color); padding: 30px; border-radius: var(--border-radius); box-shadow: 0 5px 15px var(--shadow-color); width: 100%; max-width: 500px; transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease; } .webp-converter #dropArea { border: 2px dashed var(--border-color); padding: 30px; margin-bottom: 25px; border-radius: 8px; background-color: rgba(0, 0, 0, 0.02); cursor: pointer; transition: all var(--transition-speed); position: relative; overflow: hidden; } .webp-converter #dropArea::after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom right, rgba(0, 85, 184, 0.05), rgba(0, 85, 184, 0)); opacity: 0; transition: opacity var(--transition-speed); pointer-events: none; } .webp-converter #dropArea:hover::after { opacity: 1; } .webp-converter #dropArea.hover { border-color: var(--drop-hover); background-color: rgba(0, 85, 184, 0.05); transform: scale(1.01); } .webp-converter #dropArea p { color: var(--text-color); margin: 8px 0; transition: color var(--transition-speed) ease; } .webp-converter #imageInput { background-color: transparent; margin-top: 10px; padding: 8px; border-radius: 4px; color: var(--text-color); } .webp-converter .preview { margin-top: 20px; max-height: 300px; overflow: hidden; border-radius: 8px; box-shadow: 0 3px 8px var(--shadow-color); transition: all var(--transition-speed); } .webp-converter .preview:empty { display: none; } .webp-converter .preview img { max-width: 100%; height: auto; display: block; transition: transform 0.5s ease; } .webp-converter .preview:hover img { transform: scale(1.02); } .webp-converter button { background-color: var(--primary-color); color: white; border: none; padding: 12px 25px; border-radius: 6px; cursor: pointer; font-size: 16px; font-weight: bold; transition: all 0.3s; position: relative; overflow: hidden; box-shadow: 0 4px 6px rgba(0, 85, 184, 0.2); } .webp-converter button::after { content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient( to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100% ); transition: left 0.5s; } .webp-converter button:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 10px rgba(0, 85, 184, 0.3); } .webp-converter button:hover::after { left: 100%; } .webp-converter button:active { transform: translateY(0); } .webp-converter footer { margin-top: 30px; display: flex; flex-direction: column; align-items: center; } .webp-converter footer .footer-links { display: flex; justify-content: center; align-items: center; margin-bottom: 15px; } .webp-converter footer .footer-links a { margin: 0 10px; color: var(--text-secondary); text-decoration: none; transition: all var(--transition-speed); } .webp-converter footer .footer-links a:hover, .webp-converter footer .footer-links a:focus, .webp-converter footer .footer-links a:active { color: var(--primary-color); } .webp-converter footer svg { fill: var(--text-secondary); transition: all var(--transition-speed); width: 28px; height: 28px; } .webp-converter footer svg:hover { fill: var(--primary-color); transform: scale(1.2) translateY(-3px); } .webp-converter footer p { color: var(--text-secondary); font-size: 14px; margin-top: 5px; } .webp-converter footer a { color: var(--primary-color); transition: all var(--transition-speed); text-decoration: none; } .webp-converter footer a:hover { text-decoration: underline; color: var(--primary-hover); } /* Status Messages */ .webp-converter .status-message { padding: 12px; margin: 15px 0; border-radius: 6px; font-size: 14px; display: none; animation: slideIn 0.3s ease; } .webp-converter .status-success { background-color: rgba(40, 167, 69, 0.1); border-left: 4px solid var(--success-color); color: var(--success-color); } .webp-converter .status-error { background-color: rgba(220, 53, 69, 0.1); border-left: 4px solid #dc3545; color: #dc3545; } @keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } /* Custom File Input Styling */ .webp-converter .custom-file-input { position: relative; display: inline-block; cursor: pointer; margin-top: 10px; } .webp-converter .custom-file-input input[type="file"] { position: absolute; left: 0; top: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; } .webp-converter .custom-file-input span { display: inline-block; padding: 8px 16px; border-radius: 4px; background-color: rgba(0, 85, 184, 0.1); color: var(--primary-color); font-size: 14px; transition: all var(--transition-speed); } .webp-converter .custom-file-input:hover span { background-color: rgba(0, 85, 184, 0.2); } /* Loading Animation */ .webp-converter .loading { display: none; justify-content: center; margin: 20px 0; } .webp-converter .loading-spinner { width: 40px; height: 40px; border: 4px solid rgba(0, 85, 184, 0.1); border-left-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Format Info Section */ .webp-converter .format-info { background-color: rgba(0, 85, 184, 0.05); border-radius: 8px; padding: 20px; margin-top: 30px; text-align: left; } .webp-converter .format-info h3 { color: var(--primary-color); margin-top: 0; font-size: 18px; } .webp-converter .format-info p { color: var(--text-color); font-size: 14px; line-height: 1.6; } .webp-converter .format-info ul { padding-left: 20px; } .webp-converter .format-info li { margin-bottom: 8px; color: var(--text-color); } /* Media Queries */ @media (max-width: 600px) { .webp-converter .container { padding: 20px; width: calc(100% - 30px); border-radius: 8px; } .webp-converter #dropArea { padding: 20px; } .webp-converter footer p { display: none; } .webp-converter button { width: 100%; padding: 12px 0; } .webp-converter .format-info { padding: 15px; } } @media (max-width: 400px) { .webp-converter button { font-size: 14px; } .webp-converter h1 { font-size: large; } } /* RTL Support */ .webp-converter[dir="rtl"] .format-info, [dir="rtl"] .webp-converter .format-info { text-align: right; } .webp-converter[dir="rtl"] .format-info ul, [dir="rtl"] .webp-converter .format-info ul { padding-right: 20px; padding-left: 0; } .webp-converter[dir="rtl"] .status-message, [dir="rtl"] .webp-converter .status-message { border-left: none; border-right: 4px solid; }
