/* 
 * Main stylesheet for PDF Toolkit
 * Author: PDF Toolkit Team
 * Version: 1.0
 */

 :root {
    --primary-color: #4a6ee0;
    --secondary-color: #6c8fff;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --bg-color: #f5f7ff;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: bold;
}

.logo-icon {
    background-color: white;
    color: var(--primary-color);
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: var(--secondary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background-color: white;
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.tool-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-10px);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.tool-icon img {
    width: 32px;
    height: 32px;
}

.tool-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.tool-card p {
    margin-bottom: 15px;
    color: #666;
}

.tool-card .btn {
    background-color: var(--bg-color);
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Tool Sections */
.tool-section {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    display: none;
}

.tool-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--primary-color);
}

.section-header .close-btn {
    background-color: var(--bg-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--secondary-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    transition: background-color 0.3s;
}

.upload-area:hover {
    background-color: rgba(106, 141, 255, 0.05);
}

.upload-icon {
    margin-bottom: 15px;
}

.upload-icon img {
    width: 48px;
    height: 48px;
}

.upload-text {
    margin-bottom: 15px;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-input-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

/* Controls and Options */
.option-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.control-group input,
.control-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    min-width: 120px;
}

.action-btn.secondary {
    background-color: #e0e0e0;
    color: var(--text-color);
}

/* Preview Area */
.preview-area {
    border: 1px solid #ddd;
    border-radius: 10px;
    min-height: 300px;
    margin: 20px 0;
    padding: 20px;
    background-color: white;
    overflow: auto;
}

/* File List */
.files-list {
    list-style: none;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: #777;
    margin-left: 10px;
}

.remove-file {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Loading and Progress */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-container {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #555;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

/* Responsive styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}