* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    background: #f9f9f9;
    color: #333;
    padding-top: 140px;
}

header {
    background: #0073e6;
    color: #fff;
    padding: 0px 0;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: #0073e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.site-header .logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  margin: 0;
}

header:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 75px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: rotate(-5deg) scale(1.1);
}

.logo-text {
    margin: 0;
    font-weight: 700;
    font-size: 3rem;
    transition: text-shadow 0.3s ease;
}

.logo-text:hover {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.top-nav {
  background-color: #005bb5;
  padding: 0;
  margin: 0;
  text-align: center;
  transition: box-shadow 0.3s ease;
}

.top-nav:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 2px;
    transition: transform 0.3s ease;
}

.nav-toggle:hover {
    transform: rotate(90deg);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: white;
    font-weight: 600;
    padding: 8px 12px;
    display: inline-block;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.nav-menu li a:hover {
    background-color: #004a94;
    border-radius: 4px;
    transform: translateY(-2px);
}

main {
    max-width: 1024px;
    margin: 30px auto;
    padding: 10px 20px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #0073e6;
    margin-bottom: 15px;
    font-weight: 600;
    transition: text-shadow 0.3s ease;
}

h2:hover {
    text-shadow: 0 0 6px rgba(0, 115, 230, 0.4);
}

h3 {
    color: #0073e6;
    font-weight: 600;
    transition: text-shadow 0.3s ease;
}

h3:hover {
    text-shadow: 0 0 5px rgba(0, 115, 230, 0.3);
}

p {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #333;
}

input[type="file"] {
    padding: 40px;
    font-size: 1rem;
    width: 100%;
    border: 2px dashed #0073e6;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="file"]:hover {
    border-color: #005bb5;
    box-shadow: 0 0 10px rgba(0, 115, 230, 0.3);
}

label {
    margin-right: 10px;
    cursor: pointer;
    color: #008000;
    font-weight: bold;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

label:hover {
    color: #00a000;
    text-shadow: 0 0 5px rgba(0, 160, 0, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9rem;
    transition: box-shadow 0.3s ease;
}

table:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 12px 10px;
    border: 2px solid #ddd;
    text-align: left;
    vertical-align: middle;
    transition: background-color 0.3s ease;
}

th {
    background-color: #f0f8ff;
}

tr:hover td {
    background-color: #e8f3ff;
}

progress {
    width: 100%;
    height: 18px;
    border-radius: 8px;
}

button {
    background-color: #0073e6;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

button:hover:not(:disabled) {
    background-color: #005bb5;
    box-shadow: 0 4px 10px rgba(0, 91, 181, 0.3);
    transform: translateY(-2px);
}

button:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.animate {
    display: flex;
    justify-content: center;
    width: 100%;
}

.animate img {
    width: 80%;
    max-width: 100%;
    transition: transform 0.5s ease;
}

.animate img:hover {
    transform: scale(1.05);
}

.uses-thumb {
    width: 100%;
    max-width: 50%;
    height: auto;
    display: inline-block;
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

footer:hover {
    color: #333;
}

.no-underline {
    text-decoration: none;
}

#cookie {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #222;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    display: none;
    z-index: 9999;
    transition: box-shadow 0.3s ease;
}

#cookie:hover {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

#cookie a {
    color: #808080;
    transition: color 0.3s ease;
}

#cookie a:hover {
    color: #fff;
}

.ad-placeholder {
    background: #f9f9f9;
    border: 1px solid #bbb;
    text-align: center;
    padding: 20px;
    color: #999;
    margin: 30px 0;
    font-style: italic;
    border-radius: 4px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ad-placeholder:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.upload-drop-area {
    border: 2px dashed #0073e6;
    border-radius: 8px;
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    background: #f0f8ff;
    color: #0073e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-drop-area:hover,
.upload-drop-area:focus {
    border-color: #005bb5;
    outline: none;
    box-shadow: 0 0 12px rgba(0, 115, 230, 0.3);
    transform: scale(1.02);
}

.upload-drop-area p {
    margin: 0;
    font-weight: 600;
}

.upload-drop-area small {
    color: #004a94;
    font-weight: normal;
}

.upload-drop-area input[type="file"] {
    display: none;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    color: #005bb5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.feature-item i {
    font-size: 2.5rem;
    color: #0073e6;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.feature-item i:hover {
    transform: scale(1.2) rotate(5deg);
}

.feature-item h3 {
    margin: 10px 0 8px;
    font-weight: 600;
    color: #005bb5;
}

.feature-item p {
    font-size: 0.9rem;
    color: #333;
    font-weight: normal;
    margin: 0;
}

.social-share {
    margin: 10px 0 15px;
    font-size: 28px;
    color: #0073e6;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-share a {
    color: #0073e6;
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.social-share a:hover {
    color: #005bb5;
    transform: scale(1.2);
}

.resize-page-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.resize-page-input-group label {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.resize-page-input-group input {
    padding: 10px;
    font-size: 1.2rem;
    width: 220px;
    text-align: center;
    border: 2px solid #0073e6;
    border-radius: 10px;
    outline: none;
}

.resize-page-input-group button {
    font-size: 1.3rem;
    padding: 12px 25px;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.resize-page-input-group button:hover {
    background-color: #005bb5;
}

#original-images-container,
#resized-images-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

#resized-download-button {
    display: block;
    margin: 20px auto;
    font-size: 1.2rem;
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

#resized-download-button:hover {
    background-color: #1c7e32;
}

#original-size,
#resized-size {
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    th,
    td {
        font-size: 0.8rem;
        padding: 8px 5px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-img {
        width: 40px;
        margin-right: 6px;
    }

    .site-header .logo-link {
        padding: 4px 0;
    }

    .animate img {
        width: 100%;
    }

    .uses-thumb {
        max-width: 70%;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        background-color: #005bb5;
        text-align: center;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: inline-block;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    body {
        padding-top: 120px;
    }
}
