/* Base Styles - Open PDF Tools Theme */
:root {
    --primary-color: #3b82f6;
    /* Professional Blue */
    --primary-hover: #2563eb;
    --secondary-color: #1e293b;
    /* Slate 800 */
    --background-color: #f8fafc;
    /* Slate 50 */
    --card-bg: #ffffff;
    --text-color: #475569;
    /* Slate 600 */
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--primary-color);
    font-size: 26px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-cta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lang-switch {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 20px;
}

.lang-btn {
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.lang-btn:hover {
    color: var(--primary-color);
}

.active-lang {
    color: var(--primary-color);
    font-weight: 700;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 20px 80px;
    background: #fff;
    margin-bottom: 40px;
    border-bottom: 1px solid #e2e8f0;
}

.hero h1 {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: 20px;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 10px 20px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.privacy-badge i {
    color: #22c55e;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background: var(--card-bg);
    padding: 35px 30px;
    border-radius: 16px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary-color);
}

/* Subtle decoration */
.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(59, 130, 246, 0.05) 50%);
    transition: var(--transition);
}

.tool-card:hover::after {
    transform: scale(1.2);
}

.tool-card .icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
    background: #eff6ff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.tool-card h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
}

.tool-card p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

/* Workspace Area */
.hidden {
    display: none !important;
}

#tool-workspace {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.tool-header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 200;
}

.tool-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-back {
    background: #f1f5f9;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-back:hover {
    background: #e2e8f0;
}

.workspace-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
}

.upload-zone {
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin: 40px auto;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.upload-content i {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.upload-content h3 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.btn-main {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 14px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 25px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5);
}

.btn-main:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.5);
}

.btn-large {
    position: fixed;
    bottom: 40px;
    right: 40px;
    padding: 18px 40px;
    font-size: 20px;
    z-index: 300;
}

/* Grid & List Views */
.file-list {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 900px;
}

.file-item {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    border-left: 4px solid var(--primary-color);
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 100px;
}

.grid-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    position: relative;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.grid-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.grid-item:active {
    cursor: grabbing;
}

.thumb-container {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.thumb-container canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.grid-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.grid-item .remove-btn:hover {
    background: #ef4444;
    color: #fff;
}

/* Options Panel */
.options-panel {
    position: fixed;
    right: 0;
    top: 81px;
    bottom: 0;
    width: 320px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    padding: 30px;
    z-index: 100;
    overflow-y: auto;
}

@media (max-width: 1100px) {
    .options-panel {
        position: relative;
        width: 100%;
        max-width: 600px;
        top: auto;
        bottom: auto;
        border: none;
        background: transparent;
        margin-bottom: 100px;
        padding: 0;
    }

    .workspace-area {
        padding-right: 20px;
    }
}

.tool-options h3 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.btn-option {
    padding: 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    color: #64748b;
    font-weight: 600;
}

.btn-option.active {
    background: #eff6ff;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 36px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .btn-large {
        width: 90%;
        right: 5%;
        bottom: 20px;
        justify-content: center;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: #94a3b8;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    margin-top: 60px;
}