@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #000000;
    --text-secondary: #444444;
    --text-muted: #888888;
    --accent-color: #111111;
    --border-color: #e5e5e5;
    --border-color-active: #000000;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Header / Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

header.sticky-scrolled {
    padding: 12px 0;
    box-shadow: var(--shadow-subtle);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.logo svg {
    width: 28px;
    height: 28px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition-fast);
}

/* Page Layout */
main {
    min-height: calc(100vh - 350px);
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 0 40px 0;
    background-color: var(--bg-color);
}

.hero-headline {
    font-family: var(--font-secondary);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-subheadline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px auto;
}

.hero-cta {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    border: 1px solid var(--accent-color);
    cursor: pointer;
}

.hero-cta:hover {
    background-color: transparent;
    color: var(--accent-color);
}

/* Popular Tools Grid */
.section-title {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: -0.5px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.tool-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

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

.tool-icon-wrapper {
    background-color: var(--bg-secondary);
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: var(--transition-fast);
}

.tool-card:hover .tool-icon-wrapper {
    background-color: var(--text-primary);
    color: #ffffff;
}

.tool-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.tool-name {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tool-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-link-btn {
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.tool-link-btn svg {
    width: 16px;
    height: 16px;
    transition: var(--transition-fast);
}

.tool-card:hover .tool-link-btn svg {
    transform: translateX(4px);
}

/* Upload Interface */
.upload-container {
    background-color: var(--bg-color);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    margin-bottom: 30px;
    position: relative;
}

.upload-container:hover, .upload-container.dragover {
    border-color: var(--border-color-active);
    background-color: var(--bg-secondary);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.upload-icon svg {
    width: 48px;
    height: 48px;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.file-input {
    display: none;
}

/* Main Tool Workspace Layout (Sidebar / Main) */
.tool-workspace {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

.tool-main {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
}

.tool-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Control Panel Component */
.control-group {
    margin-bottom: 24px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.control-val {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Custom Range Input */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Custom Inputs and Selects */
.input-text, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-fast);
    background-color: var(--bg-color);
}

.input-text:focus, select:focus {
    border-color: var(--border-color-active);
}

/* Flex row inputs */
.flex-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox container */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.checkbox-container input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
}

/* Button variants */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

/* Preview Panel */
.preview-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
}

.preview-box {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-height: 250px;
    justify-content: center;
}

.preview-title {
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.preview-wrapper {
    max-width: 100%;
    max-height: 350px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.preview-meta {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.preview-meta span {
    font-weight: 600;
    color: var(--text-primary);
}

/* Compare View Slider (Before/After) */
.comparison-slider-container {
    position: relative;
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.comparison-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.image-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
}

.image-after {
    display: block;
    width: 100%;
}

.slider-handle-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ffffff;
    cursor: ew-resize;
    z-index: 20;
    left: 50%;
    pointer-events: none;
}

.slider-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-color: var(--text-primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 30;
    pointer-events: none;
}

.slider-control-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 40;
    cursor: ew-resize;
}

/* Advertisement Layout Placements */
.ad-unit {
    background-color: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    overflow: hidden;
}

.ad-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.ad-below-hero {
    max-width: 970px;
    min-height: 90px;
    margin: 20px auto;
}

.ad-sidebar {
    width: 100%;
    min-height: 250px;
    max-height: 600px;
}

.ad-between-content {
    max-width: 100%;
    min-height: 90px;
    margin: 40px 0;
}

.ad-footer-banner {
    max-width: 728px;
    min-height: 90px;
    margin: 40px auto 0 auto;
}

/* SEO Content Section */
.seo-content-section {
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.seo-title {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.seo-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.seo-text {
    font-size: 0.98rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.seo-list {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.seo-list li {
    margin-bottom: 8px;
    font-size: 0.98rem;
}

/* FAQ Layout */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
    margin-bottom: 60px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-color);
    transition: var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--border-color-active);
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-icon {
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* History / Recent Activity Component */
.recent-activity-section {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color);
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.activity-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.activity-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Custom Interactive Crop Grid overlay */
.crop-overlay {
    position: absolute;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
    cursor: move;
}

.crop-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #ffffff;
    border: 1px solid #000000;
}

.crop-handle.tl { top: -5px; left: -5px; cursor: nwse-resize; }
.crop-handle.tr { top: -5px; right: -5px; cursor: nesw-resize; }
.crop-handle.bl { bottom: -5px; left: -5px; cursor: nesw-resize; }
.crop-handle.br { bottom: -5px; right: -5px; cursor: nwse-resize; }

/* Grid guide lines */
.crop-overlay::before, .crop-overlay::after {
    content: '';
    position: absolute;
    border: 1px dashed rgba(255,255,255,0.4);
    pointer-events: none;
}
.crop-overlay::before {
    top: 33.33%;
    bottom: 33.33%;
    left: 0;
    right: 0;
}
.crop-overlay::after {
    left: 33.33%;
    right: 33.33%;
    top: 0;
    bottom: 0;
}

/* Footer Section */
footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px 0;
    color: var(--text-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 320px;
}

.footer-heading {
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.9rem;
}

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

.footer-contact-info {
    font-size: 0.9rem;
}

.footer-contact-info p {
    margin-bottom: 12px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
}

/* Contact Page Form */
.contact-form-card {
    max-width: 600px;
    margin: 40px auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.textarea-field {
    width: 100%;
    min-height: 150px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    resize: vertical;
    transition: var(--transition-fast);
}

.textarea-field:focus {
    border-color: var(--border-color-active);
}

.success-message {
    background-color: #f4fdf6;
    border: 1px solid #c2eed0;
    color: #1e7e34;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

/* Info Box Component */
.info-box {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    background-color: var(--bg-secondary);
    margin-bottom: 30px;
}

.info-box-title {
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

/* Help Center Section Cards */
.help-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.help-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition-normal);
}

.help-card:hover {
    border-color: var(--border-color-active);
    box-shadow: var(--shadow-hover);
}

.help-card h3 {
    font-family: var(--font-secondary);
    margin-bottom: 12px;
}

.help-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
