/* * Main Stylesheet
 * ---------------
 * I'm using CSS Variables here to mimic SASS functionality.
 * It keeps the color palette centralized and easy to change.
 */

 :root {
    /* Brand Colors */
    --primary-color: #e53935;       /* That classic PDF red */
    --primary-hover: #d32f2f;
    --text-dark: #333333;
    --text-grey: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    
    /* Spacing & Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-card: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 20px rgba(0,0,0,0.1);
    
    /* Layout */
    --container-width: 1200px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* * Navigation 
 */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 15px;
}

.btn-login {
    background-color: #f5f5f5;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background-color: #eee;
}

/* * Hero & Tool Header 
 */
.hero, .tool-header {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero h1, .tool-header h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    color: var(--text-dark);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero p, .tool-header p {
    font-size: 1.25rem;
    color: var(--text-grey);
    max-width: 700px;
    margin: 0 auto;
}

/* * Tools Grid (Homepage) 
 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    padding-bottom: 80px;
}

.tool-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.icon-wrapper {
    margin-bottom: 24px;
    color: var(--primary-color);
    background: #fff5f5;
    padding: 16px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

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

.tool-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
    font-weight: 700;
}

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

/* * Workspace & Upload Zone 
 */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 80px;
}

.upload-container {
    width: 100%;
    max-width: 850px;
}

.upload-zone {
    background-color: var(--white);
    border: 3px dashed #ddd;
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background-color: #fffafa;
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 30px;
    background: #fff1f0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.btn-big-red {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 18px 48px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px 0 rgba(229, 57, 53, 0.39);
    transition: all 0.2s ease;
    display: inline-block;
    border: none;
    z-index: 1;
}

.btn-big-red:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.45);
}

.drop-text {
    margin-top: 25px;
    color: var(--text-grey);
    font-weight: 500;
    font-size: 1rem;
}

/* * Alerts & Messages 
 */
.alert {
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    width: 100%;
    max-width: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    animation: slideDown 0.4s ease-out;
}

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

.alert.error {
    background-color: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffa39e;
}

.alert.success {
    background-color: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.alert a {
    text-decoration: underline;
    margin-left: 10px;
}

/* * File List Preview Layout (Ready for next phase)
 */
.file-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    width: 100%;
    margin-top: 30px;
}

.file-item {
    background: white;
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid #eee;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-card);
}

.file-item .file-name {
    font-size: 0.8rem;
    margin-top: 10px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* * Footer 
 */
.footer {
    background: #fff;
    border-top: 1px solid #ebebeb;
    padding: 50px 0;
    text-align: center;
    color: var(--text-grey);
    margin-top: auto;
    font-size: 0.9rem;
}

/* Responsive Tweak */
@media (max-width: 768px) {
    .hero h1, .tool-header h1 {
        font-size: 2rem;
    }
    .btn-big-red {
        font-size: 1.1rem;
        padding: 15px 30px;
    }
    .upload-zone {
        padding: 40px 20px;
        min-height: 300px;
    }
}