:root {
    /* Color Palette */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    /* Brand Colors */
    --brand-primary: #e11d48; /* Red for PDF */
    --brand-primary-hover: #be123c;
    --brand-gradient: linear-gradient(135deg, #e11d48, #f43f5e);
    
    /* Accents */
    --accent-red: #fee2e2;
    --accent-red-text: #e11d48;
    --accent-orange: #ffedd5;
    --accent-orange-text: #ea580c;
    --accent-green: #dcfce7;
    --accent-green-text: #16a34a;
    --accent-blue: #dbeafe;
    --accent-blue-text: #2563eb;
    --accent-yellow: #fef9c3;
    --accent-yellow-text: #ca8a04;
    --accent-purple: #f3e8ff;
    --accent-purple-text: #9333ea;

    /* Shadows & Border Radius */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Layout */
    --container-width: 1200px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-logo i {
    color: var(--brand-primary);
    font-size: 2rem;
}

.brand-logo span {
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
}

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

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #ffe4e6;
    top: -100px;
    right: 10%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #e0e7ff;
    bottom: -50px;
    left: 15%;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Tools Section */
.tools-section {
    padding: 5rem 0;
    background: var(--surface-color);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glass);
    border-color: transparent;
}

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

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

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

.tool-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tool-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Tool Card Accents */
.accent-red:hover { border-bottom: 3px solid var(--brand-primary); }
.accent-red .tool-icon { background: var(--accent-red); color: var(--accent-red-text); }

.accent-orange:hover { border-bottom: 3px solid var(--accent-orange-text); }
.accent-orange .tool-icon { background: var(--accent-orange); color: var(--accent-orange-text); }

.accent-green:hover { border-bottom: 3px solid var(--accent-green-text); }
.accent-green .tool-icon { background: var(--accent-green); color: var(--accent-green-text); }

.accent-blue:hover { border-bottom: 3px solid var(--accent-blue-text); }
.accent-blue .tool-icon { background: var(--accent-blue); color: var(--accent-blue-text); }

.accent-yellow:hover { border-bottom: 3px solid var(--accent-yellow-text); }
.accent-yellow .tool-icon { background: var(--accent-yellow); color: var(--accent-yellow-text); }

.accent-purple:hover { border-bottom: 3px solid var(--accent-purple-text); }
.accent-purple .tool-icon { background: var(--accent-purple); color: var(--accent-purple-text); }


/* Footer */
footer {
    background: var(--surface-color);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--brand-primary);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--brand-primary);
}

/* Specific Tool Page Styles (tool.php) */
.tool-header {
    text-align: center;
    padding: 4rem 0 2rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.workspace {
    padding: 0 0 5rem;
}

.dropzone {
    background: var(--bg-color);
    border: 2px dashed var(--brand-primary);
    border-radius: var(--radius-xl);
    padding: 5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.dropzone.dragover {
    background: rgba(225, 29, 72, 0.05); /* very light primary */
    border-width: 3px;
    transform: scale(1.02);
}

.dropzone-icon {
    font-size: 4rem;
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
}

.dropzone-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.dropzone-text p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

#file-input {
    display: none;
}

/* File List & Progress */
.file-list {
    margin-top: 2rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-item {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-item-icon {
    font-size: 2rem;
    color: var(--brand-primary);
}

.file-item-name {
    font-weight: 500;
}

.file-item-size {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.remove-file {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
}

.remove-file:hover {
    color: var(--brand-primary);
}

.action-bar {
    margin-top: 2rem;
    text-align: center;
    display: none; /* Shown via JS when files are added */
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Aggiungere hamburger menu in futuro */
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .dropzone {
        padding: 3rem 1rem;
        min-height: 300px;
    }
}
