@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    background: #f9f9f9;
    color: #333;
    padding-top: 140px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  width: 60px;
  height: auto;
  margin-right: 10px;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.logo-text {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0073e6;
}

.top-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-menu li a:hover {
  background-color: #f0f0f0;
  color: #000;
}

.nav-toggle {
  display: none;
}

main {
    max-width: 1024px;
    margin: 8px 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, #converted-size {
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

.convert-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.convert-controls label {
    font-weight: bold;
    margin-right: 5px;
    color: #0073e6;
}

.convert-controls select,
.convert-controls input[type="range"] {
    padding: 6px 10px;
    border: 2px solid #0073e6;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.convert-controls select:hover,
.convert-controls input[type="range"]:hover {
    border-color: #005bb5;
    box-shadow: 0 0 5px rgba(0,115,230,0.3);
}

.convert-controls span#quality-val {
    font-weight: bold;
    margin-left: 5px;
}

.convert-controls button {
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 10px;
    background-color: #0073e6;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.convert-controls button:hover {
    background-color: #005bb5;
    box-shadow: 0 4px 10px rgba(0, 91, 181, 0.3);
    transform: translateY(-2px);
}

.resize-controls label {
    font-weight: 700;
    color: #005bb5;
    background: #e6f0ff;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 4px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: default;
}

.resize-controls label:hover {
    background-color: #cce0ff;
    color: #003f80;
    transform: translateY(-1px);
}

.resize-controls input[type="number"] {
    width: 120px;
    padding: 8px 10px;
    border: 2px solid #0073e6;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.resize-controls input[type="number"]:hover {
    border-color: #005bb5;
    box-shadow: 0 0 5px rgba(0,115,230,0.3);
}

.resize-controls input[type="checkbox"] + label {
    cursor: pointer;
    background: none;
    padding: 0;
    color: #0073e6;
}

.resize-controls input[type="checkbox"]:hover + label {
    color: #005bb5;
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .convert-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .convert-controls label,
    .convert-controls select,
    .convert-controls input[type="range"],
    .convert-controls span#quality-val,
    .convert-controls button {
        width: 100%;
        text-align: center;
    }

    .convert-controls input[type="range"] {
        margin-top: 5px;
    }

    .resize-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .resize-controls label,
    .resize-controls input[type="number"],
    .resize-controls button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 600px) {
  .site-header {
    padding: 10px 10px;
    height: auto;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
    background-color: #ffffff;
    border-top: 1px solid #eaeaea;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
    margin: 5px 0;
  }
    
    th,
    td {
        font-size: 0.8rem;
        padding: 8px 5px;
    }

    .animate img {
        width: 100%;
    }

    .uses-thumb {
        max-width: 70%;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    body {
        padding-top: 120px;
    }
}
