* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1a1a2e;
    background: #f8fafc;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: #fff;
    border-bottom: 1px solid #e8e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 22px;
    height: 22px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.logo-text span {
    font-size: 11px;
    color: #6b7280;
    font-weight: 400;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav a {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    position: relative;
    padding: 8px 0;
    transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
    color: #2563eb;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
    border-radius: 2px;
}

.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.nav-dropdown-trigger svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s;
}

.nav-dropdown-wrapper:hover .nav-dropdown-trigger svg {
    transform: rotate(180deg);
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -100px;
    min-width: 260px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    padding: 12px 0;
    z-index: 150;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
}

.nav-dropdown-wrapper:hover .nav-dropdown {
    display: block;
}

.nav-dropdown li a {
    display: block;
    padding: 8px 20px;
    font-size: 13.5px;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    transition: all 0.2s;
}

.nav-dropdown li a:hover {
    background: #f0f5ff;
    color: #2563eb;
}

.nav-dropdown .dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 16px;
}

.nav-dropdown .dropdown-header {
    padding: 6px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 14px;
    gap: 8px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: #374151;
    width: 180px;
    font-family: 'Inter', sans-serif;
}

.search-box input::placeholder {
    color: #9ca3af;
}

.search-box svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    background: #374151;
    border-radius: 2px;
    transition: 0.3s;
}

.tool-header {
    background: #fff;
    padding: 30px 0 20px;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.breadcrumb a {
    color: #2563eb;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.tool-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.tool-desc {
    font-size: 15px;
    color: #4b5563;
    max-width: 600px;
}

.tool-main {
    padding: 40px 0;
}

.tool-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 32px;
    max-width: 720px;
    margin: 0 auto;
}

.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: #f8fafc;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #10b981;
    background: #f0fdf4;
}

.upload-icon {
    width: 48px;
    height: 48px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.upload-icon svg {
    width: 24px;
    height: 24px;
    color: #10b981;
}

.upload-zone h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.upload-zone p {
    font-size: 13px;
    color: #6b7280;
}

.upload-zone .browse-btn {
    color: #10b981;
    font-weight: 600;
    text-decoration: underline;
}

.file-input {
    display: none;
}

.preview-container {
    display: none;
    margin-bottom: 20px;
}

.preview-container.active {
    display: block;
}

.preview-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.preview-box {
    flex: 1;
    min-width: 200px;
}

.preview-box h5 {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-box h5 .badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
    text-transform: none;
}

.preview-box h5 .badge.orig {
    background: #fef3c7;
    color: #92400e;
}

.preview-box h5 .badge.resized {
    background: #d1fae5;
    color: #065f46;
}

.preview-img-wrapper {
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    max-height: 200px;
    padding: 10px;
}

.preview-img-wrapper img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.preview-info {
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
}

.preview-info strong {
    color: #0f172a;
}

.size-selector {
    margin-bottom: 24px;
}

.size-selector h4 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.size-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.size-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    font-family: 'Inter', sans-serif;
}

.size-btn:hover {
    border-color: #6ee7b7;
}

.size-btn.active {
    border-color: #10b981;
    background: #ecfdf5;
}

.size-btn h5 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.size-btn span {
    font-size: 11px;
    color: #6b7280;
}

.custom-size-row {
    display: none;
    align-items: center;
    gap: 12px;
}

.custom-size-row.active {
    display: flex;
}

.custom-size-row label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.custom-size-row input {
    width: 100px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.custom-size-row input:focus {
    border-color: #10b981;
}

.custom-size-row span {
    font-size: 14px;
    color: #6b7280;
}

.format-selector {
    margin-bottom: 24px;
}

.format-selector h4 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.format-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.format-btn {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    font-family: 'Inter', sans-serif;
}

.format-btn:hover {
    border-color: #6ee7b7;
}

.format-btn.active {
    border-color: #10b981;
    background: #ecfdf5;
}

.format-btn h5 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.resize-btn {
    width: 100%;
    padding: 14px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resize-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.resize-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.resize-btn svg {
    width: 16px;
    height: 16px;
}

.progress-container {
    display: none;
    margin-top: 24px;
}

.progress-container.active {
    display: block;
}

.progress-bar-bg {
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 0%;
    transition: width 0.3s;
    border-radius: 99px;
}

.progress-text {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
    text-align: center;
}

.result-container {
    display: none;
    margin-top: 24px;
    padding: 20px;
    background: #ecfdf5;
    border-radius: 12px;
}

.result-container.active {
    display: block;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-box {
    background: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.stat-box span {
    display: block;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-box strong {
    font-size: 18px;
    color: #0f172a;
}

.stat-box strong.green {
    color: #10b981;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #10b981;
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.download-btn svg {
    width: 16px;
    height: 16px;
}

.reset-btn {
    margin-left: 12px;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.reset-btn:hover {
    background: #f8fafc;
}

.result-actions {
    text-align: center;
}

.tool-features {
    padding: 40px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-item {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    color: #10b981;
}

.feature-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.footer {
    background: #0f172a;
    color: #fff;
    padding: 40px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 30px;
}

.footer-brand .logo {
    margin-bottom: 10px;
}

.footer-brand .logo-icon {
    background: #2563eb;
}

.footer-brand .logo-text h1 {
    color: #fff;
}

.footer-brand .logo-text span {
    color: #94a3b8;
}

.footer-brand p {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 16px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 32px;
    height: 32px;
    background: #1e293b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.footer-social a:hover {
    background: #2563eb;
}

.footer-social a svg {
    width: 15px;
    height: 15px;
    fill: #94a3b8;
}

.footer-social a:hover svg {
    fill: #fff;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    font-size: 13px;
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.newsletter p {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 12px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    gap: 0;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #334155;
    background: #1e293b;
    border-radius: 8px 0 0 8px;
    font-size: 13px;
    color: #fff;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.newsletter-form input::placeholder {
    color: #64748b;
}

.newsletter-form button {
    padding: 10px 18px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
}

.newsletter-form button:hover {
    background: #1d4ed8;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 16px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: #64748b;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    background: #fff;
    width: 280px;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.mobile-menu-close svg {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-search {
    margin-top: 20px;
}

.mobile-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .nav-dropdown {
        left: -150px;
        min-width: 240px;
    }
}

@media (max-width: 768px) {

    .nav,
    .search-box {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .tool-title {
        font-size: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .size-options {
        flex-direction: column;
    }

    .result-stats {
        flex-direction: column;
        gap: 12px;
    }

    .preview-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tool-card {
        padding: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.tool-card {
    display: block
}