@import url("https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap");

:root {
    --primary-color: #000000;
    --primary-hover: #1a1a1a;
    --primary-light: #333333;
    --success-color: #000000;
    --success-hover: #1a1a1a;
    --accent-color: #2d2d2d;
    --accent-hover: #1a1a1a;
    --bg-color: #ffffff;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    --card-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-color: 0 4px 16px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Improve touch scrolling on iOS */
    -webkit-overflow-scrolling: touch;
}

body {
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    /* Prevent text size adjustment on iOS */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Animated Wave Background - Monochrome */
body::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 50%, #e8e8e8 100%);
    z-index: -3;
}

body::after {
    content: '';
    position: fixed;
    width: 325vh;
    height: 325vh;
    top: 0;
    left: 50%;
    transform: translate(-50%, -75%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.15) 100%);
    border-radius: 45%;
    animation: animate 5s linear infinite;
    z-index: -2;
}

.wave-layer-1,
.wave-layer-2 {
    content: '';
    position: fixed;
    width: 325vh;
    height: 325vh;
    top: 0;
    left: 50%;
    pointer-events: none;
    z-index: -1;
}

.wave-layer-1 {
    transform: translate(-50%, -75%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.10) 100%);
    border-radius: 40%;
    animation: animate 10s linear infinite;
}

.wave-layer-2 {
    transform: translate(-50%, -75%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(0, 0, 0, 0.08) 100%);
    border-radius: 42.5%;
    animation: animate 15s linear infinite;
}

@keyframes animate {
    0% {
        transform: translate(-50%, -75%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -75%) rotate(360deg);
    }
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    padding: 1.25rem 2rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 4px 20px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: var(--transition);
}

.header-brand:hover {
    opacity: 0.8;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

header h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: 800;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 50%, #333333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
    font-family: 'Brush Script MT', 'Segoe Script', 'Lucida Handwriting', cursive;
    text-transform: none;
}

.header-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-align: center;
    margin: 0;
    display: none;
}

.header-badge {
    display: inline-block;
    background: var(--accent-color);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    border: 1px solid var(--accent-color);
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: white;
    white-space: nowrap;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation */
.main-nav {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 0 auto;
    justify-content: flex-end;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 30px;
    background: transparent;
    border: 1px solid transparent;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-link:hover {
    background: #fff3e0;
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
    user-select: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #fff3e0;
    color: var(--primary-color);
}

main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-section {
    background: white;
    border-radius: 24px;
    padding: 3rem 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.tool-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.tool-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.tool-badge-new {
    background: linear-gradient(135deg, #1a1a1a, #4a4a4a);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.section-header {
    margin-bottom: 2.5rem;
    text-align: center;
    padding-bottom: 0;
    border-bottom: none;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
}

/* Upload Area */
.upload-area {
    margin: 0 auto 2rem auto;
    max-width: 700px;
    display: block;
    width: 100%;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.drop-zone:hover .upload-icon {
    transform: translateY(-6px);
    color: var(--primary-hover);
}

.drop-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.supported-formats {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Controls Panel */
.controls-panel {
    background: #fafafa;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.control-group {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    text-align: center;
    width: 100%;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.input-with-unit {
    display: flex;
    gap: 0.5rem;
    max-width: 300px;
    width: 100%;
}

.input-with-unit input {
    flex: 1;
}

.input-with-unit select {
    width: 80px;
}

input[type="number"],
select {
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    font-weight: 500;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}

.dimensions-input-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dimension-input {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dimension-input label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dimension-input input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    background: white;
}

.dimension-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.dimension-options {
    margin-top: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 10px;
    background: #ffe0b2;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 3px solid white;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid white;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#percentage-value,
#threshold-value {
    min-width: 60px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 1.05rem;
.help-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: center;
}   color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    max-width: 300px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-success:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn span {
    position: relative;
    z-index: 1;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Preview Container */
.preview-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1200px;
    margin: 2rem auto;
}

.preview-divider {
    width: 3px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3), transparent);
    align-self: stretch;
    margin: 2rem 0;
    border-radius: 2px;
    position: relative;
}

.preview-divider::before {
    content: '→';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border: 2px solid var(--primary-color);
}

.preview-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.preview-panel h3,
.preview-side h3 {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    font-size: 0.95rem;
    opacity: 0.8;
}

.image-wrapper {
    width: 100%;
    max-width: 500px;
    border: 2px solid rgba(0, 0, 0, 0.06);
    border-radius: 30px;
    overflow: hidden;
    background: white;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.image-wrapper.checkerboard {
    background-image: 
        linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.file-size {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dimensions,
.format-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    background: #f5f5f5;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    display: inline-block;
}

.reduction {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Single Preview Container (New UX) */
.preview-container-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.preview-single {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.preview-single .image-wrapper {
    width: 100%;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.preview-single .image-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.preview-container-single .btn {
    min-width: 250px;
    align-self: center;
    margin: 0 auto;
}

/* Input Preview (before conversion) */
.input-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
    text-align: center;
}

.input-preview h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.input-preview .image-wrapper {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.input-preview .image-info {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    justify-content: center;
}

.input-preview .image-info span {
    padding: 0.4rem 0.9rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    flex-wrap: wrap;
}

/* PDF Tools Styles */
.pdf-controls {
    background: #fafafa;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.pdf-info {
    margin-bottom: 2rem;
    text-align: center;
}

.pdf-info h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.pdf-info p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.page-selection {
    margin-top: 2rem;
}

.page-selection h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.selection-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.page-input-group {
    margin-top: 1rem;
}

.page-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.page-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-inputs input {
    flex: 1;
}

.pdf-preview {
    margin-top: 2rem;
}

.pdf-preview h3 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.pdf-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pdf-page-thumb {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    background: white;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.pdf-page-thumb:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pdf-page-thumb.selected {
    border-color: var(--primary-color);
    background: #f0f0f0;
    box-shadow: var(--shadow-md);
}

.pdf-page-thumb.selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pdf-page-thumb canvas {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.page-number {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* PDF Signer Styles */
.pdf-preview-section {
    margin-top: 2rem;
}

.pdf-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.pdf-info-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pdf-info-inline h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.pdf-info-inline span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    background: #f0f0f0;
    border-radius: 6px;
}

/* PDF Workspace with Control Panel */
.pdf-workspace {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.pdf-canvas-container {
    position: relative;
    flex: 1;
    display: inline-block;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

/* Control Panel */
.control-panel {
    width: 280px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 20px;
    flex-shrink: 0;
}

.control-panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.control-panel-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.control-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.control-section:last-child {
    border-bottom: none;
}

.control-section-action {
    background: #fafafa;
    border-radius: 0 0 12px 12px;
}

.control-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.control-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    padding: 0.5rem 0.75rem;
    min-width: 40px;
}

/* Size Control */
.size-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.size-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e5e5;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.size-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.size-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    padding: 0.25rem;
    background: #f0f0f0;
    border-radius: 4px;
}

/* Page Navigation Group */
.page-nav-group {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
}

.page-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

/* Control Info Tips */
.control-info {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

.control-info small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.control-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.control-info li {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.control-info li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

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

.btn-secondary:hover {
    background: #d1d5db;
}

#pdf-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Signature Wrapper with Controls */
.signature-wrapper {
    position: absolute;
    cursor: default;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s, opacity 0.3s;
    box-sizing: border-box;
}

.signature-wrapper:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.signature-wrapper.signature-applied {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.draggable-signature {
    width: 100%;
    height: 100%;
    display: block;
    cursor: move;
    border-radius: 2px;
    opacity: 0.95;
    transition: opacity 0.2s;
    pointer-events: auto;
    /* Better touch handling */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.draggable-signature:hover {
    opacity: 1;
}

.signature-applied .draggable-signature {
    opacity: 1 !important;
    cursor: default !important;
}

/* Remove Button */
.signature-remove-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    z-index: 10;
    padding: 0;
}

.signature-remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.signature-remove-btn:active {
    transform: scale(0.95);
}

/* Resize Handles */
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Increase touch target size for mobile */
    touch-action: none;
}

/* Larger touch targets on mobile */
@media (max-width: 768px) {
    .resize-handle {
        width: 20px;
        height: 20px;
    }
    
    .resize-handle-nw {
        top: -10px;
        left: -10px;
    }
    
    .resize-handle-ne {
        top: -10px;
        right: -10px;
    }
    
    .resize-handle-sw {
        bottom: -10px;
        left: -10px;
    }
    
    .resize-handle-se {
        bottom: -10px;
        right: -10px;
    }
}

.resize-handle:hover {
    background: var(--primary-color);
}

.resize-handle-nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.resize-handle-ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.resize-handle-sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.resize-handle-se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

/* Footer */
footer {
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    margin-top: auto;
    position: relative;
    z-index: 1;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #000000, #4a4a4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

footer a:hover {
    letter-spacing: 2px;
    opacity: 0.7;
}

footer p::before {
    content: '';
    font-size: 1rem;
}

/* Donate Button */
.donate-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.donate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.donate-btn:hover::before {
    opacity: 1;
}

.donate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

@media (max-width: 768px) {
    .donate-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .preview-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .preview-divider {
        width: 100%;
        height: 2px;
        margin: 0;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    header {
        padding: 1rem 1.5rem;
        position: relative;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .header-tagline {
        font-size: 0.85rem;
    }
    
    .header-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.8rem;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem;
        margin: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        z-index: 99;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav.active {
        max-height: 500px;
        opacity: 1;
        padding: 1rem 1.5rem;
    }
    
    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 8px;
        text-align: left;
    }
    
    /* Mobile dropdown styles */
    .nav-dropdown {
        display: flex;
        flex-direction: column;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        margin: 0;
        padding: 0;
        background: #f8f9fa;
        border-radius: 8px;
        margin-top: 0.5rem;
    }
    
    .nav-dropdown:hover .dropdown-menu {
        display: none;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-trigger::after {
        content: ' ▾';
        transition: transform 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-trigger::after {
        transform: rotate(180deg);
        display: inline-block;
    }
    
    .dropdown-item {
        padding: 0.75rem 1.5rem;
        border-radius: 6px;
        margin: 0.25rem 0.5rem;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .tools-grid {
        gap: 1.5rem;
    }
    
    .tool-card {
        padding: 2rem;
    }
    
    .features-section {
        padding: 2rem 1.5rem;
    }
    
    .features-section h2 {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tool-section {
        padding: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        width: 48px;
        height: 48px;
    }
    
    .controls-panel {
        padding: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    main {
        padding: 1rem 0.5rem;
    }
    
    .hero-section {
        padding: 2rem 0.5rem;
    }
    
    .tool-section {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .drop-text {
        font-size: 1rem;
    }
    
    .image-wrapper {
        max-width: 100%;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation for showing/hiding elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.controls-panel,
.preview-container {
    animation: fadeIn 0.4s ease-out;
}

/* Homepage Styles */
.hero {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 48px;
    padding: 4rem 3.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.12), transparent 55%),
                radial-gradient(circle at 10% 80%, rgba(255, 107, 53, 0.08), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3.5rem;
    flex-wrap: wrap;
}

.hero-copy {
    flex: 1 1 360px;
    max-width: 520px;
}

.hero-copy .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.12);
    color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    margin-bottom: 1.75rem;
}

.hero-copy h2 {
    font-size: clamp(2.5rem, 4vw, 3.25rem);
    line-height: 1.1;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-copy p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-benefits {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.hero-benefits li {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    background: rgba(255, 243, 224, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    color: var(--text-secondary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hero-benefits span {
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-actions .btn {
    max-width: none;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--primary-hover);
}

.hero-visual {
    flex: 1 1 340px;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.hero-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
}

.hero-circle-lg {
    width: 320px;
    height: 320px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 224, 0.9));
    border: 1px solid rgba(0, 0, 0, 0.2);
    z-index: 2;
    position: relative;
}

.hero-circle-sm {
    width: 140px;
    height: 140px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.15);
    top: 10%;
    right: 5%;
    z-index: 3;
    color: var(--primary-color);
    font-weight: 700;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-circle-md {
    width: 200px;
    height: 200px;
    background: rgba(255, 107, 53, 0.14);
    border: 1px solid rgba(255, 107, 53, 0.2);
    bottom: -5%;
    left: 0;
    z-index: 1;
    color: #e65a1f;
    font-weight: 700;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-circle strong {
    font-size: 1.9rem;
}

.hero-circle span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.hero-card {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hero-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.hero-upload {
    background: rgba(255, 243, 224, 0.8);
    border-radius: 24px;
    padding: 1.25rem;
    border: 1px dashed rgba(0, 0, 0, 0.25);
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-upload-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 0.85rem 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.stat-pill strong {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.stat-pill span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tool-showcase {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 3.5rem;
    margin-left: auto;
    margin-right: auto;
}

.section-heading {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.section-heading h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--text-primary);
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #333333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-heading .section-subtitle {
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.7;
    font-weight: 400;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    justify-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.tool-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tool-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #e0e0e0, #b0b0b0);
    opacity: 0;
    z-index: -1;
    border-radius: 24px;
    transition: opacity 0.4s ease;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover::after {
    opacity: 0.05;
}

.tool-card-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: linear-gradient(135deg, #000000, #333333);
    color: white;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.tool-card-badge.tool-badge-new {
    background: linear-gradient(135deg, #1a1a1a, #4a4a4a);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.tool-card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.08) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.tool-card:hover .tool-card-icon {
    transform: translateY(-5px) rotate(-5deg) scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.tool-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.tool-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
    flex-grow: 1;
    display: grid;
    gap: 0.65rem;
    position: relative;
    z-index: 1;
}

.tool-features li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.tool-features li::before {
    content: '✓';
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    flex-shrink: 0;
}

.tool-card-action {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    letter-spacing: 0.01em;
}

.tool-card:hover .tool-card-action {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
}

.quality-section {
    width: 100%;
    max-width: 1200px;
    padding: 3.5rem 1rem;
}

.quality-ring {
    width: min(100%, 620px);
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 224, 0.85));
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.quality-core {
    background: white;
    border-radius: 50%;
    width: 220px;
    height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.quality-core h4 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

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

.quality-item {
    position: absolute;
    width: 220px;
    padding: 1.5rem;
    background: white;
    border-radius: 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-align: center;
    display: grid;
    gap: 0.5rem;
}

.quality-item strong {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.quality-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.quality-item-1 {
    top: 8%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.quality-item-2 {
    right: -5%;
    top: 50%;
    transform: translate(0, -50%);
}

.quality-item-3 {
    bottom: 8%;
    left: 50%;
    transform: translate(-50%, 50%);
}

.quality-item-4 {
    left: -5%;
    top: 50%;
    transform: translate(0, -50%);
}

.workflow-section {
    width: 100%;
    max-width: 1200px;
    margin: 3.5rem auto;
    background: white;
    border-radius: 44px;
    padding: 3.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 3rem;
    align-items: center;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.workflow-content .section-heading {
    text-align: left;
    margin-bottom: 2rem;
}

.workflow-steps {
    display: grid;
    gap: 1.75rem;
}

.workflow-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

.step-index {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.12);
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.1rem;
}

.workflow-step h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.workflow-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.workflow-gallery {
    position: relative;
    display: grid;
    gap: 1.5rem;
    justify-items: end;
}

.gallery-card {
    background: rgba(255, 243, 224, 0.9);
    border-radius: 32px;
    padding: 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    width: 260px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
    display: grid;
    gap: 1rem;
}

.gallery-card span {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    text-transform: uppercase;
}

.gallery-card-lg {
    width: 320px;
}

.gallery-mock {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 224, 0.8));
    border-radius: 24px;
    height: 180px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.gallery-mock-alt {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.1));
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.gallery-bubble {
    position: absolute;
    left: -40px;
    bottom: 35%;
    background: white;
    border-radius: 999px;
    padding: 1rem 1.75rem;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.2);
    display: grid;
    gap: 0.25rem;
    text-align: center;
    min-width: 140px;
}

.gallery-bubble strong {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.gallery-bubble span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.testimonial-section {
    width: 100%;
    max-width: 1200px;
    margin: 3.5rem auto;
    display: grid;
    gap: 2.5rem;
}

.testimonial-card {
    background: white;
    border-radius: 40px;
    padding: 3rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    display: grid;
    gap: 1.75rem;
    position: relative;
}

.testimonial-avatar {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.1);
    display: grid;
    place-items: center;
    font-size: 2.25rem;
}

.testimonial-card blockquote {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.testimonial-meta strong {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.testimonial-meta span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.trust-strip {
    background: rgba(255, 243, 224, 0.8);
    border-radius: 32px;
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
}

.trust-strip span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.trust-logos {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-weight: 600;
    color: var(--text-primary);
}

.cta-section {
    width: 100%;
    max-width: 1200px;
    margin: 4rem auto 2rem;
}

.cta-ring {
    position: relative;
    border-radius: 60px;
    padding: 3px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.35), rgba(255, 107, 53, 0.2));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.cta-card {
    background: white;
    border-radius: 58px;
    padding: 3.5rem 3rem;
    display: grid;
    gap: 1.75rem;
    text-align: center;
}

.cta-card h3 {
    font-size: clamp(2.1rem, 3vw, 2.6rem);
    font-weight: 800;
    color: var(--text-primary);
}

.cta-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 1100px) {
    .workflow-section {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .workflow-gallery {
        justify-items: center;
    }

    .gallery-bubble {
        position: static;
    }
}

@media (max-width: 900px) {
    .hero {
        padding: 3.5rem 2.5rem;
    }

    .hero-circle-lg {
        width: 260px;
        height: 260px;
    }

    .hero-circle-md {
        width: 170px;
        height: 170px;
        left: 6%;
    }

    .hero-circle-sm {
        top: 8%;
        right: 12%;
    }

    .quality-item {
        width: 200px;
    }

    .quality-item-2 {
        right: 0;
    }

    .quality-item-4 {
        left: 0;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 2rem;
    }

    .hero-inner {
        gap: 2.5rem;
    }

    .hero-circle {
        position: relative;
        margin: 0 auto;
    }

    .hero-visual {
        min-height: auto;
    }

    .hero-circle-lg,
    .hero-circle-md,
    .hero-circle-sm {
        position: relative;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }

    .hero-circle-md {
        margin-top: -40px;
    }

    .hero-circle-sm {
        margin-top: -60px;
    }

    .quality-ring {
        padding: 2rem;
    }

    .quality-item {
        position: static;
        transform: none;
    }

    .quality-ring {
        display: grid;
        gap: 1.5rem;
    }

    .workflow-section {
        padding: 3rem 2.5rem;
    }

    .workflow-step {
        gap: 1rem;
    }

    .testimonial-card {
        padding: 2.5rem;
    }

    .cta-card {
        padding: 3rem 2.5rem;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 2.5rem 1.75rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-benefits li {
        align-items: flex-start;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .workflow-section {
        padding: 2.5rem 1.75rem;
    }

    .gallery-card,
    .gallery-card-lg {
        width: 100%;
    }

    .testimonial-card {
        padding: 2.25rem 1.75rem;
    }

    .cta-card {
        padding: 2.75rem 1.75rem;
    }

    .pdf-preview-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .pdf-info-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .pdf-workspace {
        flex-direction: column;
    }

    .control-panel {
        width: 100%;
        position: relative;
        top: 0;
    }
}

/* Image to PDF Converter Styles */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.control-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    text-align: center;
}

.control-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.control-actions .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
}

#convertBtn {
    display: block;
    margin: 2rem auto 0 auto;
    max-width: 400px;
}

.image-item {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: move;
    transition: var(--transition);
    position: relative;
}

.image-item:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.image-item.dragging {
    opacity: 0.5;
}

.image-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-info {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.image-number {
    background: var(--accent-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.image-name {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drag-handle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: white;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    cursor: move;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.btn-remove:hover {
    color: #ef4444;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.option-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-item label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.info-steps {
    padding-left: 0;
    margin: 1rem auto;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
    max-width: 600px;
    list-style-position: inside;
}

.info-steps li {
    margin: 0.5rem 0;
}

.info-section h3 {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* JPG to SVG specific styles */
#svgPreview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

#svgPreview svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-wrapper {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-wrapper img,
.image-wrapper svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.info-note {
    background: rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.info-note strong {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .image-preview {
        height: 150px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* PDF Merger Styles */
.pdf-list {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
}

.pdf-list h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.pdf-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.pdf-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fafafa;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: move;
    transition: var(--transition);
}

.pdf-item:hover {
    border-color: var(--primary-color);
    background: #f5f5f5;
    transform: translateX(5px);
}

.pdf-item-drag {
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: grab;
}

.pdf-item-drag:active {
    cursor: grabbing;
}

.pdf-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pdf-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pdf-item-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pdf-item-order {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
}

.pdf-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pdf-item-remove:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.pdf-list-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.result-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
    min-height: 400px;
}

.result-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.result-icon {
    font-size: 4rem;
    margin: 0 auto 1rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 auto 1rem auto;
    text-align: center;
}

.result-info {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 1.5rem auto;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 12px;
    text-align: center;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem auto 0 auto;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .pdf-item {
        flex-wrap: wrap;
    }
    
    .pdf-item-info {
        width: 100%;
    }
    
    .pdf-list-actions {
        flex-direction: column;
    }
    
    .pdf-list-actions .btn {
        width: 100%;
    }
}

/* ========================================
   COMPREHENSIVE MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Increase touch targets for better mobile usability */
    .btn {
        min-height: 48px;
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .btn-icon {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
    }
    
    /* Improve input fields for mobile */
    input[type="range"] {
        height: 44px;
        cursor: pointer;
    }
    
    input[type="file"] {
        min-height: 44px;
    }
    
    /* Better spacing for controls */
    .controls-panel {
        gap: 1rem;
    }
    
    .control-group {
        margin-bottom: 1.25rem;
    }
    
    /* Optimize drop zones for touch */
    .drop-zone {
        min-height: 200px;
        padding: 2.5rem 1.5rem;
        touch-action: manipulation;
    }
    
    .drop-zone p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Improve preview containers */
    .preview-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .preview-divider {
        display: none;
    }
    
    /* Better image previews on mobile */
    .preview-section {
        max-width: 100%;
    }
    
    .preview-image {
        max-height: 300px;
    }
    
    /* Optimize result cards */
    .result-card {
        padding: 1.5rem;
    }
    
    .result-card h3 {
        font-size: 1.25rem;
    }
    
    /* Better control panels on mobile */
    .control-panel {
        width: 100%;
        max-width: 100%;
        margin-top: 1.5rem;
    }
    
    .control-section {
        padding: 1rem;
    }
    
    /* Improve page navigation */
    .page-nav-group {
        gap: 0.75rem;
    }
    
    .page-nav-group button {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.25rem;
    }
    
    /* Better radio buttons and checkboxes */
    .radio-label,
    .checkbox-label {
        padding: 1rem;
        min-height: 48px;
        font-size: 1rem;
    }
    
    input[type="radio"],
    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    /* Optimize sliders */
    .size-slider {
        height: 8px;
        touch-action: manipulation;
    }
    
    .size-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .size-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
    
    /* Better format selection */
    .format-option {
        padding: 1rem;
        min-height: 48px;
    }
    
    /* Improve PDF workspace layout */
    .pdf-workspace {
        flex-direction: column;
    }
    
    .pdf-canvas-container {
        width: 100%;
        max-width: 100%;
        order: 1;
    }
    
    .control-panel {
        order: 2;
        width: 100%;
    }
    
    /* Better page thumbnails */
    .pdf-page-thumb {
        min-height: 150px;
    }
    
    .pdf-page-thumb canvas {
        max-width: 100%;
        height: auto;
    }
    
    /* Optimize signature controls */
    .signature-remove-btn {
        width: 32px;
        height: 32px;
        font-size: 24px;
        touch-action: manipulation;
    }
    
    /* Better file list items */
    .pdf-item,
    .file-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .pdf-item-actions,
    .file-item-actions {
        gap: 0.5rem;
    }
    
    .pdf-item-actions button,
    .file-item-actions button {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Improve action buttons spacing */
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 100%;
    }
    
    /* Better control hints and labels */
    .control-label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .control-hint {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Optimize quality selector */
    .quality-options {
        gap: 0.75rem;
    }
    
    .quality-option {
        padding: 1rem;
        min-height: 60px;
    }
    
    /* Better page size selection */
    .page-size-option {
        padding: 1rem;
        min-height: 48px;
    }
    
    /* Improve drag handles visibility on mobile */
    .pdf-item-drag,
    .file-item-drag {
        font-size: 1.5rem;
        padding: 0.5rem;
        touch-action: manipulation;
    }
    
    /* Better remove buttons */
    .pdf-item-remove,
    .file-item-remove,
    .page-remove-btn {
        min-width: 36px;
        min-height: 36px;
        font-size: 1.25rem;
    }
    
    /* Optimize canvas controls */
    #pdf-canvas {
        max-width: 100%;
        height: auto !important;
        touch-action: pan-x pan-y;
    }
    
    /* Better info displays */
    .pdf-info,
    .file-info {
        font-size: 0.9rem;
    }
    
    .pdf-info-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* Improve header on very small screens */
    .brand-logo {
        width: 36px;
        height: 36px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    /* Better tool badges */
    .tool-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }
    
    /* Optimize section headers */
    .section-header {
        text-align: center;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .section-header p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* Extra small devices optimization */
@media (max-width: 480px) {
    /* Tighter spacing for small screens */
    .tool-section {
        padding: 1rem 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
        min-height: 180px;
    }
    
    .upload-icon {
        width: 40px;
        height: 40px;
    }
    
    .drop-text {
        font-size: 0.95rem;
    }
    
    .supported-formats {
        font-size: 0.8rem;
    }
    
    /* Smaller previews on tiny screens */
    .preview-image {
        max-height: 250px;
    }
    
    /* Compact control panels */
    .control-section {
        padding: 0.875rem;
    }
    
    .control-panel-header h4 {
        font-size: 1rem;
    }
    
    /* Tighter page navigation */
    .page-nav-group {
        gap: 0.5rem;
    }
    
    /* Smaller quality options */
    .quality-option {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    /* Compact result cards */
    .result-card {
        padding: 1.25rem;
    }
    
    .result-card h3 {
        font-size: 1.1rem;
    }
    
    /* Better canvas fit */
    .pdf-canvas-container {
        padding: 0.5rem;
    }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    /* Adjust heights for landscape */
    .drop-zone {
        min-height: 150px;
        padding: 1.5rem 1rem;
    }
    
    .preview-image {
        max-height: 220px;
    }
    
    /* Side-by-side controls in landscape */
    .control-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .control-actions .btn {
        flex: 1;
        min-width: 45%;
    }
}

/* Touch device specific optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase all interactive elements for touch */
    button,
    .btn,
    .nav-link,
    .tool-card,
    .radio-label,
    .checkbox-label,
    .format-option {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* Remove hover states on touch devices */
    .btn:hover,
    .tool-card:hover,
    .nav-link:hover {
        transform: none;
    }
    
    /* Active states for touch feedback */
    .btn:active {
        transform: scale(0.98);
    }
    
    .tool-card:active,
    .nav-link:active {
        opacity: 0.9;
    }
    
    /* Better drag indicators */
    .pdf-item-drag,
    .file-item-drag {
        opacity: 0.8;
    }
    
    /* Larger touch targets for small controls */
    .signature-remove-btn {
        width: 36px;
        height: 36px;
    }
}

/* ========================================
   DISCLAIMER CARD
   ======================================== */

.disclaimer-card {
    max-width: 1200px;
    margin: 3rem auto 2rem;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.disclaimer-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
}

.disclaimer-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}

.disclaimer-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .disclaimer-card {
        margin: 2rem auto 1.5rem;
        padding: 0 1rem;
    }
    
    .disclaimer-content {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
    }
    
    .disclaimer-content h4 {
        font-size: 1.1rem;
    }
    
    .disclaimer-content p {
        font-size: 0.9rem;
    }
}

/* ========================================
   Category Filter Tabs
   ======================================== */

.category-filter {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 2.5rem auto 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.65rem 1.5rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.02);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   Small Tool Cards Grid (Reference Style)
   ======================================== */

.tools-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.tool-card-small {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tool-card-small:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.tool-card-small.hidden {
    display: none;
    animation: fadeOut 0.2s ease;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tool-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tool-icon-emoji {
    font-size: 1.5rem;
}

.tool-title-small {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.tool-desc-small {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Adjust section heading for new style */
.tool-showcase .section-heading {
    text-align: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 4rem 2rem 3rem;
    border-radius: 24px;
    margin: 0 1rem 3rem;
}

.privacy-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 1024px) {
    .tools-grid-small {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .category-filter {
        margin: 2rem auto;
        padding: 0 1rem;
    }

    .filter-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }

    .tool-showcase .section-heading {
        padding: 3rem 1.5rem 2.5rem;
        margin: 0 0.5rem 2rem;
    }

    .privacy-badge {
        font-size: 0.65rem;
        padding: 0.6rem 1.5rem;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .tools-grid-small {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.875rem;
    }

    .tool-card-small {
        padding: 1.25rem 1rem;
    }

    .tool-icon-box {
        width: 40px;
        height: 40px;
        margin-bottom: 0.75rem;
    }

    .tool-icon-emoji {
        font-size: 1.25rem;
    }

    .tool-title-small {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }

    .tool-desc-small {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .tools-grid-small {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Trust & Compliance Section (Reference Style)
   ======================================== */

.trust-section {
    background: transparent;
    padding: 4rem 2rem;
    margin: 3rem 0 0;
    text-align: center;
}

.trust-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.trust-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 900px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.trust-icon-circle {
    width: 80px;
    height: 80px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.trust-badge:hover .trust-icon-circle {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.15);
}

.trust-icon-text {
    font-size: 2rem;
}

.trust-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 1024px) {
    .trust-badges {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .trust-section {
        padding: 3rem 1.5rem;
    }

    .trust-title {
        font-size: 1.75rem;
    }

    .trust-description {
        font-size: 0.95rem;
        margin-bottom: 2.5rem;
    }

    .trust-badges {
        gap: 2.5rem;
    }

    .trust-icon-circle {
        width: 70px;
        height: 70px;
    }

    .trust-icon-text {
        font-size: 1.75rem;
    }

    .trust-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .trust-badges {
        flex-direction: column;
        gap: 2rem;
    }

    .trust-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .compliance-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .compliance-badge h4 {
        font-size: 1rem;
    }

    .compliance-badge p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .compliance-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   WebP Converter Specific Styles
   ======================================== */

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 1rem;
    white-space: nowrap;
}

.btn-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    line-height: 1;
    padding: 0;
}

.btn-remove:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.progress-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-info span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.results-section {
    margin: 2rem 0;
}

.results-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.result-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.result-info {
    flex: 1;
}

.result-info strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-sizes {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.savings-positive {
    color: #28a745;
    font-weight: 600;
}

.savings-negative {
    color: #dc3545;
    font-weight: 600;
}

@media (max-width: 768px) {
    .file-list {
        max-height: 200px;
    }
    
    .file-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .file-name {
        flex: 1 1 100%;
        margin-right: 0;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .result-sizes {
        font-size: 0.8rem;
    }
}

/* ========================================
   PWA Install Prompt
   ======================================== */

.pwa-prompt {
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 450px;
    width: calc(100% - 2rem);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
}

.pwa-prompt.show {
    top: 0;
    opacity: 1;
}

.pwa-prompt-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    position: relative;
}

.pwa-prompt-close {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    font-weight: 300;
}

.pwa-prompt-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

.pwa-prompt-icon {
    font-size: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.pwa-prompt-text {
    flex: 1;
    min-width: 0;
}

.pwa-prompt-text h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
}

.pwa-prompt-text p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.3;
}

.pwa-prompt .btn {
    flex-shrink: 0;
    background: white;
    color: #667eea;
    border: none;
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.pwa-prompt .btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pwa-prompt .btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .pwa-prompt {
        padding: 0.875rem 1rem;
        max-width: calc(100% - 1.5rem);
    }

    .pwa-prompt-content {
        gap: 0.75rem;
    }

    .pwa-prompt-icon {
        font-size: 1.75rem;
    }

    .pwa-prompt-text h4 {
        font-size: 0.95rem;
    }

    .pwa-prompt-text p {
        font-size: 0.8rem;
    }

    .pwa-prompt .btn {
        padding: 0.5rem 1.125rem;
        font-size: 0.85rem;
    }

    .pwa-prompt-close {
        width: 26px;
        height: 26px;
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .pwa-prompt {
        max-width: calc(100% - 1rem);
        padding: 0.75rem 0.875rem;
    }

    .pwa-prompt-icon {
        font-size: 1.5rem;
    }

    .pwa-prompt .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   REGEX EXTRACTOR TOOL STYLES
   ======================================== */

/* Input area */
#regex-section .input-area {
    margin: 2rem auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.input-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    box-sizing: border-box;
}

.input-container h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    word-wrap: break-word;
}

#textInput {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    resize: vertical;
    line-height: 1.6;
    transition: var(--transition);
    box-sizing: border-box;
}

#textInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.highlight-container {
    position: relative;
    display: none;
    max-width: 100%;
    box-sizing: border-box;
}

.highlight-container.visible {
    display: block;
}

#highlightedText {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background: #fafafa;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    max-height: 500px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.highlight {
    background-color: #fff176;
    padding: 2px 0;
    border-radius: 2px;
    font-weight: 600;
}

/* Controls */
.controls-container {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    width: 100%;
}

.controls-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.control-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.control-group select,
.control-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: var(--transition);
}

.control-group select:hover,
.control-group input:hover {
    border-color: var(--primary-color);
}

.control-group select:focus,
.control-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

#customRegexInput {
    display: none;
}

#customRegexInput.visible {
    display: block;
}

.pattern-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 12px;
    margin: 10px auto 8px auto;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    max-width: 900px;
    justify-items: center;
    box-sizing: border-box;
    width: 100%;
}

.pattern-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 6px;
    transition: background 0.2s;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    user-select: none;
    box-sizing: border-box;
}

.pattern-checkbox span {
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pattern-checkbox:hover {
    background: rgba(0, 0, 0, 0.05);
}

.pattern-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    margin: 0;
    flex-shrink: 0;
}

.secondary-btn {
    padding: 6px 14px;
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 8px;
    transition: all 0.3s;
    font-weight: 600;
    box-sizing: border-box;
}

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

.match-type {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Results section */
.results-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: none;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.results-container.visible {
    display: block;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    word-break: break-word;
}

.results-count {
    background: var(--primary-color);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
}

.results-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th,
.results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.results-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.results-table tr:hover {
    background: #f5f5f5;
}

.results-table td:first-child {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-color);
    word-break: break-all;
}

.results-table td:nth-child(2) {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.results-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.context-match {
    background: #fff176;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
    color: var(--text-primary);
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Statistics Panel */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Action Buttons Row */
.action-buttons-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-action:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Cheat Sheet */
.cheat-sheet {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.cheat-toggle {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cheat-toggle:hover {
    background: var(--primary-hover);
}

.cheat-content {
    margin-top: 1.5rem;
}

.cheat-content h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.cheat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.cheat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.cheat-item code {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

.cheat-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Pattern Library */
.pattern-library {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.pattern-library h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.saved-patterns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.saved-pattern-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.saved-pattern-item:hover {
    background: #e9ecef;
}

.pattern-info {
    flex: 1;
}

.pattern-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pattern-regex {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pattern-actions {
    display: flex;
    gap: 0.5rem;
}

.pattern-actions button {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.pattern-actions button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-save-pattern {
    width: 100%;
    background: transparent;
    border: 2px dashed var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save-pattern:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f8f9fa;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 2rem 1rem;
}

/* Sample data button */
.sample-data {
    margin-top: 1rem;
    text-align: center;
}

.sample-data button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.sample-data button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive - Regex Extractor */

/* Large tablets and small desktops (1024px - 1200px) */
@media (max-width: 1200px) {
    .pattern-selector {
        grid-template-columns: repeat(3, 1fr);
        max-width: 800px;
    }
    
    .cheat-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .controls-container {
        max-width: 900px;
    }
}

@media (max-width: 1024px) {
    .pattern-selector {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-header {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .cheat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 768px) {
    .pattern-selector {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px;
        gap: 4px 8px;
        max-height: 200px;
    }
    
    .pattern-checkbox {
        font-size: 0.8rem;
        padding: 3px 5px;
    }
    
    .pattern-checkbox input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }

    .controls-grid {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .results-header > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    #textInput,
    #highlightedText {
        min-height: 200px;
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .results-table {
        font-size: 0.8rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem 0.35rem;
        font-size: 0.75rem;
    }
    
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .action-buttons-row {
        gap: 0.5rem;
    }
    
    .btn-action {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .cheat-grid {
        grid-template-columns: 1fr;
    }
    
    .controls-container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .input-container {
        padding: 1rem;
    }
    
    .input-container h3 {
        font-size: 1rem;
    }
    
    .secondary-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
        margin-right: 5px;
    }
    
    .match-type {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .pattern-library,
    .cheat-sheet {
        padding: 1rem;
    }
    
    .saved-pattern-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .pattern-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Small tablets and large phones (480px - 768px) */
@media (max-width: 600px) {
    .pattern-selector {
        grid-template-columns: 1fr 1fr;
        gap: 3px 6px;
        padding: 8px;
    }
    
    .stats-panel {
        grid-template-columns: 1fr 1fr;
    }
    
    .results-table th:nth-child(n+4),
    .results-table td:nth-child(n+4) {
        display: none;
    }
    
    .cheat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

/* Mobile phones (320px - 480px) */
@media (max-width: 480px) {
    #regex-section .input-area {
        margin: 1rem auto;
    }
    
    .pattern-selector {
        grid-template-columns: 1fr;
        max-height: 250px;
        padding: 6px;
    }
    
    .pattern-checkbox {
        font-size: 0.75rem;
        padding: 4px 6px;
    }
    
    #textInput,
    #highlightedText {
        min-height: 180px;
        font-size: 0.8rem;
        padding: 0.65rem;
    }
    
    .controls-container {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .input-container {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .input-container h3 {
        font-size: 0.95rem;
    }
    
    .stats-panel {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.65rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .action-buttons-row {
        flex-direction: column;
        gap: 0.35rem;
    }
    
    .btn-action {
        width: 100%;
        min-width: auto;
        justify-content: center;
        font-size: 0.75rem;
        padding: 0.6rem;
    }
    
    .results-container,
    .cheat-sheet,
    .pattern-library {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .results-header h3 {
        font-size: 1rem;
    }
    
    .results-count {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
    }
    
    .results-table {
        font-size: 0.7rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.4rem 0.25rem;
    }
    
    .table-wrapper {
        max-height: 400px;
    }
    
    .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.8rem;
    }
    
    .secondary-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        margin-right: 4px;
    }
    
    .cheat-toggle {
        font-size: 0.9rem;
        padding: 0.65rem;
    }
    
    .cheat-item code {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .cheat-item span {
        font-size: 0.75rem;
    }
    
    .sample-data button {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }
}

/* Extra small phones (320px and below) */
@media (max-width: 360px) {
    .pattern-checkbox {
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .pattern-checkbox input[type="checkbox"] {
        width: 12px;
        height: 12px;
    }
    
    #textInput,
    #highlightedText {
        font-size: 0.75rem;
    }
    
    .results-table {
        font-size: 0.65rem;
    }
    
    .btn {
        font-size: 0.75rem;
        padding: 0.55rem 1rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    #textInput,
    #highlightedText {
        min-height: 150px;
    }
    
    .pattern-selector {
        max-height: 150px;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .table-wrapper {
        max-height: 300px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .results-table th,
    .results-table td {
        border-width: 0.5px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .pattern-checkbox,
    .btn-action,
    .secondary-btn,
    .sample-data button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .pattern-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .control-group input,
    .control-group select {
        min-height: 44px;
    }
}

/* ================================
   DONATE PAGE STYLES
   ================================ */

/* Donate Hero Section */
.donate-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.donate-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.donate-title {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.donate-subtitle {
    font-size: 1.4rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Donate Container */
.donate-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* Why Donate Section */
.donate-why {
    padding: 60px 20px;
    background: #f8f9fa;
}

.donate-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.benefit-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.benefit-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #667eea;
}

.benefit-card p {
    color: #666;
    line-height: 1.6;
}

/* Donation Options Section */
.donate-options {
    padding: 60px 20px;
}

/* Currency Toggle */
.currency-toggle {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    max-width: 600px;
}

.currency-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #000;
    background: white;
    color: #000;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.currency-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.currency-btn.active {
    background: #000;
    color: white;
    border-color: #000;
}

/* Amount Input Container */
.amount-input-container {
    max-width: 500px;
    margin: 30px auto;
    text-align: center;
}

.amount-input-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    text-align: center;
}

.amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    pointer-events: none;
}

.amount-input-wrapper input {
    width: 100%;
    padding: 20px 20px 20px 50px;
    font-size: 1.5rem;
    font-weight: 600;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    box-sizing: border-box;
    text-align: center;
}

.amount-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.amount-hint {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 0.95rem;
}

/* Donor Info */
.donor-info {
    margin: 30px auto;
    max-width: 500px;
    text-align: center;
}

.donor-info label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.donor-info input,
.donor-info textarea {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

.donor-info input:focus,
.donor-info textarea:focus {
    outline: none;
    border-color: #667eea;
}

.donor-info textarea {
    resize: vertical;
    min-height: 80px;
}

/* Donate Button */
.btn-donate {
    width: 100%;
    max-width: 500px;
    padding: 18px;
    font-size: 1.3rem;
    font-weight: 700;
    background: #000;
    color: white;
    border: 2px solid #000;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    display: block;
}

.btn-donate:hover {
    background: white;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Payment Info */
.payment-info {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.95rem;
}

.payment-badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 10px;
}

/* Impact Section */
.donate-impact {
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.donate-impact .section-title,
.donate-impact .section-description {
    color: white;
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.impact-stat {
    text-align: center;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.impact-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.impact-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Alternatives Section */
.donate-alternatives {
    padding: 60px 20px;
}

.alternative-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.alternative-card {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.alternative-card:hover {
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.alternative-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.alternative-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.alternative-card p {
    color: #666;
    line-height: 1.6;
}

/* FAQ Section */
.donate-faq {
    padding: 60px 20px;
    background: #f8f9fa;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin: 0 auto 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.faq-item.active {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.faq-question {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-item.active .faq-question {
    color: #667eea;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    color: #666;
    line-height: 1.7;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Thanks Section */
.donate-thanks {
    padding: 80px 20px;
    text-align: center;
}

.thanks-message {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 20px auto 30px;
    line-height: 1.8;
}

/* Responsive Design for Donate Page */
@media screen and (max-width: 768px) {
    .donate-title {
        font-size: 2rem;
    }
    
    .donate-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .donate-hero {
        padding: 50px 20px;
    }
    
    .currency-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .currency-btn {
        width: 100%;
        padding: 15px 20px;
    }
    
    .amount-input-wrapper input {
        font-size: 1.3rem;
        padding: 18px 18px 18px 45px;
    }
    
    .currency-symbol {
        font-size: 1.3rem;
        left: 15px;
    }
    
    .impact-number {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 480px) {
    .donate-title {
        font-size: 1.6rem;
    }
    
    .donate-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .amount-input-wrapper input {
        font-size: 1.2rem;
        padding: 15px 15px 15px 40px;
    }
    
    .currency-symbol {
        font-size: 1.2rem;
    }
    
    .benefit-card,
    .alternative-card {
        padding: 20px;
    }
    
    .btn-donate {
        font-size: 1.1rem;
        padding: 15px;
    }
}

/* ================================
   JSON TO C# CONVERTER STYLES
   ================================ */

.json-converter-section {
    padding: 60px 20px;
    min-height: 60vh;
}

.converter-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Input Section */
.input-section {
    margin: 30px 0;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.input-header h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 0;
}

.input-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.file-upload-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.file-upload-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.secondary-btn {
    padding: 10px 20px;
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

#jsonInput {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    resize: vertical;
    box-sizing: border-box;
    background: #f8f9fa;
}

#jsonInput:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

/* Options Section */
.options-section {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

.options-section h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 0 0 20px 0;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.option-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-item span {
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.option-item input[type="text"] {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.option-item input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-option {
    flex-direction: row;
    align-items: center;
}

.checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-option span {
    order: 2;
}

.checkbox-option input {
    order: 1;
    margin-right: 10px;
}

/* Convert Section */
.convert-section {
    text-align: center;
    margin: 40px 0;
}

.convert-btn {
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    background: #000;
    color: white;
    border: 2px solid #000;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.convert-btn:hover {
    background: white;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Output Section */
.output-section {
    margin: 40px 0;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.output-header h3 {
    font-size: 1.3rem;
    color: #333;
    margin: 0;
}

.output-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.primary-btn {
    padding: 10px 20px;
    background: #000;
    color: white;
    border: 2px solid #000;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background: white;
    color: #000;
    transform: translateY(-2px);
}

#csharpOutput {
    width: 100%;
    max-height: 600px;
    overflow: auto;
    padding: 0;
    background: #1e1e1e;
    border-radius: 10px;
    margin: 0;
}

#csharpOutput code {
    display: block;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #d4d4d4;
    line-height: 1.6;
    white-space: pre;
}

/* Error and Success Messages */
.error-message,
.success-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    font-weight: 600;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message {
    background: #fee;
    color: #c00;
    border: 2px solid #fcc;
}

.success-message {
    background: #efe;
    color: #0a0;
    border: 2px solid #cfc;
}

/* Info Section */
.info-section {
    padding: 60px 20px;
    background: #f8f9fa;
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Responsive Design for JSON Converter */
@media screen and (max-width: 768px) {
    .input-header,
    .output-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-actions,
    .output-actions {
        width: 100%;
    }

    .file-upload-btn,
    .secondary-btn,
    .primary-btn {
        flex: 1;
        text-align: center;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .convert-btn {
        width: 100%;
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    #jsonInput {
        min-height: 200px;
        font-size: 0.9rem;
    }

    #csharpOutput code {
        font-size: 0.85rem;
    }
}

@media screen and (max-width: 480px) {
    .json-converter-section {
        padding: 30px 15px;
    }

    .options-section {
        padding: 20px 15px;
    }

    .feature-card {
        padding: 20px;
    }

    .convert-btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
}
