/**
 * EASYUTILITIES.COM - Modern Design System v2.0
 * 
 * Features:
 * - Elegant dark theme with purple/blue accents
 * - Advanced glassmorphism with layered depth
 * - Smooth micro-animations
 * - Modern gradient accents
 * - Enhanced visual hierarchy
 */

:root {
    /* Color Palette - Modern Purple/Blue Theme */
    --primary-color: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary-color: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 50%, #10b981 100%);
    --accent-gradient-hover: linear-gradient(135deg, #7c3aed 0%, #0891b2 50%, #059669 100%);
    
    /* Background Colors */
    --bg-dark: #0a0a0f;
    --bg-elevated: #12121a;
    --card-bg: #16161f;
    --card-bg-hover: #1e1e2a;
    
    /* Text Colors */
    --text-main: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(139, 92, 246, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);
    
    /* Spacing */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
}

/* --- Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(6, 182, 212, 0.1), transparent);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* --- Navigation & Header --- */
header {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), transparent);
    opacity: 0.5;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
    transform: scale(1.02);
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.15rem;
}

.logo-icon {
    font-size: 2rem;
    margin-right: 0.6rem;
    filter: drop-shadow(0 0 12px var(--primary-glow));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 12px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 20px var(--primary-glow)); }
}

.logo-text-easy {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-text-utilities {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo-text-com {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    color: var(--text-main);
    background: var(--glass-bg-hover);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::after {
    width: 60%;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

/* --- Layout Containers --- */
main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    margin-bottom: 5rem;
    padding: 2rem 0;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: -1.5px;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-secondary) 50%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}

/* --- Dashboard / Tool Grid --- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tool-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-hover);
    background: var(--card-bg-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover::after {
    opacity: 0.15;
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

/* --- Tool Interface & Upload Logic --- */
.hidden {
    display: none !important;
}

#tool-interface {
    max-width: 860px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#tool-interface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

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

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    background: transparent;
}

.back-btn:hover {
    color: var(--primary-color);
    background: var(--glass-bg-hover);
    transform: translateX(-4px);
}

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    margin-bottom: 2rem;
    background: var(--glass-bg);
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.drop-zone:hover,
.drop-zone.active {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: inset 0 0 40px rgba(139, 92, 246, 0.1);
}

.drop-zone:hover::before,
.drop-zone.active::before {
    opacity: 0.2;
}

.drop-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    display: block;
    transition: transform 0.3s ease;
}

.drop-zone:hover .drop-icon {
    transform: translateY(-4px);
}

.drop-zone p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.drop-zone p span {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Components & Buttons --- */
.file-list {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    background: var(--glass-bg);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.file-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.file-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--glass-border);
}

.primary-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.primary-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px var(--primary-glow);
}

.primary-btn:hover::before {
    opacity: 1;
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.secondary-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- Status & Feedback --- */
.status {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-bg);
    border-top: 3px solid var(--primary-color);
    border-right: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    text-align: center;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    margin-top: 2rem;
    animation: slideUp 0.4s ease;
}

.result h3 {
    color: #10b981;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.result p {
    color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Image Editing Preview UI --- */
.image-preview {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: grid;
    gap: 1.25rem;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.preview-dimensions {
    color: var(--primary-color);
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.preview-hidden {
    display: none !important;
}

.image-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.resize-box {
    position: relative;
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-md);
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    min-width: 160px;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.5);
    touch-action: none;
    box-shadow: var(--shadow-md);
}

.resize-handle {
    position: absolute;
    width: 28px;
    height: 28px;
    background: var(--accent-gradient);
    border: 3px solid white;
    border-radius: 50%;
    bottom: -14px;
    right: -14px;
    cursor: nwse-resize;
    z-index: 100;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resize-handle:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-glow);
}

.resize-handle::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    position: absolute;
    top: 5px;
    left: 5px;
}

.resize-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    border-radius: calc(var(--radius-md) - 2px);
}

.crop-wrapper {
    position: relative;
    width: 100%;
    max-height: 520px;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-wrapper img {
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    display: block;
}

.crop-box {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
}

.crop-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent-gradient);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.crop-handle:hover {
    transform: scale(1.2);
}

.crop-handle.nw {
    top: -8px;
    left: -8px;
    cursor: nwse-resize;
}

.crop-handle.ne {
    top: -8px;
    right: -8px;
    cursor: nesw-resize;
}

.crop-handle.sw {
    bottom: -8px;
    left: -8px;
    cursor: nesw-resize;
}

.crop-handle.se {
    bottom: -8px;
    right: -8px;
    cursor: nwse-resize;
}

.rotate-wrapper {
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    max-height: 520px;
}

.rotate-wrapper img {
    max-width: 100%;
    max-height: 460px;
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease;
}

.rotate-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--glass-border);
    margin-top: 6rem;
    padding: 4rem 2rem 2rem;
    background: var(--bg-elevated);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), transparent);
    opacity: 0.5;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.footer-section h4 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.85rem;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-section ul li a:hover {
    color: var(--text-main);
}

.footer-section ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-section ul li a:hover::after {
    width: 100%;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-subtle);
    font-size: 0.85rem;
}

/* --- Reorder & Rotate Page Styles --- */
.thumbnail-item {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
}

.thumbnail-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 50% 0%, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.thumbnail-item:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.thumbnail-item:hover::before {
    opacity: 0.15;
}

.thumbnail-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.thumbnail-item img {
    border-radius: var(--radius-sm);
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
    background: white;
}

.thumbnail-index {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--accent-gradient);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.rotate-btn {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.rotate-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* --- Drag and Drop Specifics --- */
.thumbnail-item.dragging {
    opacity: 0.35;
    border: 2px dashed var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    cursor: move;
    transform: scale(0.96);
    box-shadow: none !important;
}

/* Highlight the thumbnail acting as current drop target */
.thumbnail-item.drop-hint {
    position: relative;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.thumbnail-item.drop-hint::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    pointer-events: none;
    z-index: 1;
}

.thumbnail-item.drop-hint::after {
    content: 'Drop Here';
    position: absolute;
    top: 8px;
    left: 50%;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 2;
    transform: translateX(-50%);
    box-shadow: var(--shadow-sm);
}

/* --- Form Inputs --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
    color: var(--text-subtle);
}

input[type="checkbox"] {
    accent-color: var(--primary-color);
}

input[type="range"] {
    accent-color: var(--primary-color);
}

/* --- Content Pages (About, Privacy, How It Works) --- */
.content-container {
    animation: fadeIn 0.5s ease-out;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateX(4px);
}

.step-card:hover::before {
    opacity: 1;
}

.step-card h2 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    nav {
        padding: 1rem 1.5rem;
    }
    
    main {
        padding: 3rem 1.5rem;
    }
    
    .tool-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.5rem;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    nav ul {
        gap: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    #tool-interface {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg);
    }
    
    .drop-zone {
        padding: 3rem 1.5rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .primary-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logo-text-easy,
    .logo-text-utilities,
    .logo-text-com {
        font-size: 1.2rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .tool-card {
        padding: 1.75rem 1.5rem;
    }
    
    .drop-zone {
        padding: 2.5rem 1rem;
    }
    
    .drop-icon {
        font-size: 3rem;
    }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* --- Authentication Styles --- */

/* Nav auth buttons */
.nav-login {
    color: var(--text-secondary) !important;
}

.nav-signup-btn {
    background: var(--accent-gradient) !important;
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
}

.nav-signup-btn:hover {
    background: var(--accent-gradient-hover) !important;
    transform: translateY(-2px);
}

.nav-signup-btn::after {
    display: none !important;
}

.nav-profile-link {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem !important;
}

.nav-user-icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    line-height: 1;
}

.nav-logout {
    color: var(--text-muted) !important;
}

/* Flash Messages */
.flash-messages {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.flash-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

.flash-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.flash-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.flash-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.flash-info {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #06b6d4;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

/* Limit Modal */
.limit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.limit-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 420px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.limit-modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.limit-modal-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.limit-modal-content p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.limit-subtext {
    color: var(--primary-color) !important;
    font-weight: 500;
}

.limit-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.limit-modal-actions .primary-btn,
.limit-modal-actions .secondary-btn {
    padding: 0.75rem 1.5rem;
    min-width: 120px;
}

/* Auth Container */
.auth-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
    }
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-muted);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-label-row label {
    margin-bottom: 0;
}

.forgot-password-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-form input::placeholder {
    color: var(--text-subtle);
}

.auth-form small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-subtle);
    font-size: 0.85rem;
}

.auth-btn {
    width: 100%;
    margin-top: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Social Authentication Buttons */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

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

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

.google-btn {
    background: #fff;
    color: #3c4043;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.auth-divider span {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.auth-benefits {
    padding: 2rem;
}

.auth-benefits h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.auth-benefits ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-benefits li {
    color: var(--text-secondary);
    font-size: 1rem;
}

.auth-benefits strong {
    color: var(--primary-color);
}

/* Profile Page */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.profile-header p {
    color: var(--text-muted);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.profile-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.profile-form .form-group {
    margin-bottom: 1.25rem;
}

.profile-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.profile-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.disabled-input {
    opacity: 0.6;
    cursor: not-allowed;
}

.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 2rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-left: 0.75rem;
}

.provider-badge svg {
    width: 14px;
    height: 14px;
}

.provider-badge.google {
    background: rgba(234, 67, 53, 0.1);
    border-color: rgba(234, 67, 53, 0.3);
}

.profile-form small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-subtle);
    font-size: 0.85rem;
}

.membership-card {
    text-align: center;
}

.membership-status {
    margin-bottom: 1.5rem;
}

.tier-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.tier-free, .tier-guest {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.tier-pro_basic {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.tier-pro_standard {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.tier-pro_unlimited {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.2));
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.downloads-info {
    color: var(--text-muted);
}

.downloads-count {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.profile-actions h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.action-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
}

.action-icon {
    font-size: 2rem;
}

.logout-action:hover {
    border-color: rgba(239, 68, 68, 0.3);
}

/* Membership Page */
.membership-container {
    max-width: 1100px;
    margin: 0 auto;
}

.membership-header {
    text-align: center;
    margin-bottom: 2rem;
}

.membership-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.membership-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.current-plan-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
}

.current-label {
    color: var(--text-muted);
}

.current-limit {
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px var(--primary-glow);
}

.pricing-card.current {
    border-color: var(--secondary-color);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
}

.current-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.price {
    margin-bottom: 1rem;
}

.price .currency {
    font-size: 1.25rem;
    vertical-align: top;
    color: var(--text-muted);
}

.price .amount {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price .period {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.downloads-highlight {
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.download-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.features-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
}

.check-icon {
    color: var(--secondary-color);
}

.plan-btn {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.current-btn {
    background: var(--glass-bg);
    color: var(--text-muted);
    cursor: default;
}

.upgrade-btn {
    background: var(--glass-bg);
    color: var(--text-muted);
}

.upgrade-btn:not(:disabled):hover {
    background: var(--accent-gradient);
    color: white;
}

.membership-faq {
    margin-bottom: 3rem;
}

.membership-faq h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.faq-item h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.back-link {
    text-align: center;
}

.back-link a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.back-link a:hover {
    color: var(--primary-color);
}