/* ========================================
   Yaopdf.com - Modern PDF Tools Stylesheet
   Inspired by ILOVEPDF, but better
   ======================================== */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --info: #74B9FF;

    --bg: #F8F9FD;
    --bg-card: #FFFFFF;
    --bg-dark: #2D3436;
    --bg-gradient: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 50%, #00CEC9 100%);
    --bg-gradient-warm: linear-gradient(135deg, #FD79A8 0%, #FDCB6E 100%);

    --text: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --text-white: #FFFFFF;

    --border: #E8E8F0;
    --border-light: #F0F0F8;
    --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.06);
    --shadow: 0 4px 20px rgba(108, 92, 231, 0.08);
    --shadow-lg: 0 8px 40px rgba(108, 92, 231, 0.12);
    --shadow-hover: 0 12px 48px rgba(108, 92, 231, 0.18);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    --header-height: 72px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.logo span {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-menu a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary);
    background: rgba(108, 92, 231, 0.06);
}

.nav-menu a.active {
    color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
    font-weight: 600;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(180deg, #F0EEFF 0%, var(--bg) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 206, 201, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero-badge i {
    font-size: 0.75rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero h1 .highlight {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ========================================
   Tools Section
   ======================================== */
.tools-section {
    padding: 40px 0 80px;
    position: relative;
    z-index: 2;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-gradient);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.tool-card:hover .tool-card-icon {
    transform: scale(1.1);
}

.tool-card-info {
    flex: 1;
    min-width: 0;
}

.tool-card-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.tool-card-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tool-card-arrow {
    color: var(--text-light);
    font-size: 0.85rem;
    transition: var(--transition);
    opacity: 0;
    transform: translateX(-8px);
}

.tool-card:hover .tool-card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

/* ========================================
   Features Section
   ======================================== */
.features-section {
    padding: 80px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 48px;
    letter-spacing: -0.01em;
}

.section-title .highlight {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-item {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-item:hover {
    background: var(--bg);
    transform: translateY(-4px);
}

.feature-item i {
    font-size: 2rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
    color: var(--primary);
    transition: var(--transition);
}

.feature-item:hover i {
    transform: scale(1.1);
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Tool Page Layout
   ======================================== */
.tool-page {
    padding: 100px 0 60px;
    min-height: 100vh;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    box-shadow: var(--shadow);
}

.tool-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.tool-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ========================================
   Upload Area
   ======================================== */
.upload-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.upload-area {
    padding: 60px 40px;
    text-align: center;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    margin: 24px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(108, 92, 231, 0.02);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.05);
    transform: scale(1.01);
}

.upload-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.upload-area:hover .upload-icon-wrap {
    transform: scale(1.1);
    background: var(--bg-gradient);
}

.upload-area:hover .upload-icon-wrap i {
    color: white;
}

.upload-icon-wrap i {
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition);
}

.upload-area h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.35);
}

.upload-btn:active {
    transform: translateY(0);
}

.upload-formats {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.upload-formats span {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg);
    border-radius: 4px;
    margin: 0 3px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========================================
   File List
   ======================================== */
.file-list {
    display: none;
    padding: 24px;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.file-list-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.file-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.file-item:hover {
    background: var(--border-light);
}

.file-item-icon {
    font-size: 1.3rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.file-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item-remove:hover {
    background: var(--danger);
    color: white;
}

.file-list-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.25);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.35);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border-light);
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #00E676);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 184, 148, 0.25);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 184, 148, 0.35);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ========================================
   Quality Options
   ======================================== */
.quality-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 24px;
}

.quality-option {
    position: relative;
}

.quality-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quality-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.quality-option label:hover {
    border-color: var(--primary-light);
    background: rgba(108, 92, 231, 0.03);
}

.quality-option input:checked + label {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.06);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.quality-option label i {
    font-size: 1.5rem;
    color: var(--primary);
}

.quality-option label .quality-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.quality-option label .quality-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ========================================
   Result Area
   ======================================== */
.result-area {
    display: none;
    padding: 24px;
}

.result-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-header i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 12px;
}

.result-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.result-file-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.result-file-info-item {
    text-align: center;
}

.result-file-info-item .label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.result-file-info-item .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* Compression Stats */
.compression-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.compression-stat {
    text-align: center;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
}

.compression-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.compression-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

.compression-stat.saved .stat-value {
    color: var(--success);
}

/* Result Images Grid */
.result-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.result-image-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--bg);
}

.result-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.result-image-item:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0;
    transition: var(--transition);
}

.result-image-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay span {
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.image-overlay a {
    color: white;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.image-overlay a:hover {
    background: var(--primary);
}

/* Result Files List */
.result-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.result-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.result-file-item i {
    color: var(--primary);
    font-size: 1.1rem;
}

.result-file-item span {
    flex: 1;
    font-size: 0.9rem;
}

.result-file-item a {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.result-file-item a:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.result-summary {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* ========================================
   Modal / Progress
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--bg-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast {
    position: fixed;
    top: 88px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 3000;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-info {
    background: var(--info);
    color: white;
}

.toast-error {
    background: var(--danger);
    color: white;
}

.toast-success {
    background: var(--success);
    color: white;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    margin-top: auto;
    background: var(--bg-dark);
    color: white;
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
}

.footer-col p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--primary-light);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
}

/* ========================================
   Page Content (Privacy, Terms)
   ======================================== */
.page-content {
    max-width: 800px;
    margin: 120px auto 60px;
    padding: 48px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.page-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.page-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 32px 0 12px;
}

.page-content p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

/* ========================================
   Ad Container
   ======================================== */
.ad-container {
    text-align: center;
    padding: 16px 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Responsive - Tablet
   ======================================== */
@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

/* ========================================
   Responsive - Mobile
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* Header */
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        z-index: 999;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu a {
        padding: 16px 20px;
        font-size: 1.05rem;
        width: 100%;
        border-radius: var(--radius-sm);
    }

    /* Hero */
    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 16px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .hero-stat-number {
        font-size: 1.4rem;
    }

    /* Tools Grid */
    .tools-section {
        padding: 24px 0 40px;
        margin-top: -24px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tool-card {
        padding: 20px 16px;
        gap: 14px;
    }

    .tool-card-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .tool-card-icon i {
        font-size: 1.3rem;
    }

    .tool-card-info h3 {
        font-size: 0.95rem;
    }

    .tool-card-info p {
        font-size: 0.8rem;
    }

    /* Tool Page */
    .tool-page {
        padding: 88px 0 40px;
    }

    .tool-header h1 {
        font-size: 1.6rem;
    }

    .upload-area {
        padding: 40px 20px;
        margin: 16px;
    }

    .upload-icon-wrap {
        width: 64px;
        height: 64px;
    }

    .upload-icon-wrap i {
        font-size: 1.6rem;
    }

    /* Features */
    .features-section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .feature-item {
        padding: 24px 20px;
    }

    /* Quality Options */
    .quality-options {
        grid-template-columns: 1fr;
        margin: 16px;
    }

    /* Result */
    .result-area {
        padding: 16px;
    }

    .result-file-info {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .compression-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .result-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .result-actions .btn {
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: 32px 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Page Content */
    .page-content {
        padding: 24px 16px;
        margin: 100px 16px 40px;
    }

    .page-content h1 {
        font-size: 1.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .result-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .result-file-info-item .value {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
