:root {
    /* Professional Palette - Deep Slate & Vibrant Blue */
    --primary-color: #2563eb;
    /* Royal Blue */
    --primary-dark: #1e40af;
    /* Darker Blue */
    --secondary-color: #64748b;
    /* Slate 500 */
    --background-body: #F4F7FE;
    /* Light SaaS Blue/Gray */
    --background-white: #ffffff;
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #475569;
    /* Slate 600 */
    --border-color: #e2e8f0;
    /* Slate 200 */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cropper-modal {
    opacity: 0.5 !important;
    background-color: #ffffff !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--background-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background-color: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.logo i {
    color: var(--primary-color);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem 4rem;
    background: linear-gradient(180deg, #FFFFFF 0%, #F4F7FE 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.tool-card {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: left;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.tool-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: #eff6ff;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.tool-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Footer */
footer {
    background-color: var(--background-white);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
    padding: 3rem 0;
    margin-top: 6rem;
}

/* Tool Container */
.tool-container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tool-container.immersive-mode {
    max-width: 100%;
    margin: 0;
    padding: 1rem;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* Buttons */
.btn {
    background-color: var(--primary-color);
    color: var(--background-white);
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--background-white);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--background-body);
    border-color: var(--text-muted);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    background-color: #eef2ff;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2rem;
    text-align: center;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary-color);
    border: 1px solid #dbeafe;
}

.drop-zone i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--text-muted);
    font-weight: 500;
}

/* Utilities */
.hidden {
    display: none !important;
}

.result-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Page Indicator/Previews */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.page-card {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.page-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.page-preview {
    display: block;
    width: 100%;
    height: auto;
}

/* Cropper Customization */
.cropper-bg {
    background: transparent !important;
}

.tool-container.immersive-mode .result-area {
    border-top: none;
}

.security-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #eff6ff;
    color: var(--primary-dark);
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #dbeafe;
}

.security-note i {
    font-size: 1rem;
}

/* Content Pages */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.content-section p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.content-section h2 {
    color: var(--text-main);
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.content-section h3 {
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.content-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}


/* Shop Page */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-card {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image {
    height: 200px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--secondary-color);
}

.product-details {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}