/* Comprehensive Responsive Styles for the entire website */

/* Base responsive styles */
html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container styles */
.container,
.main-content,
.emoji-combiner-container,
.font-generator-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  /* padding: 1rem; */
}

/* Header responsive styles */
header {
  width: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 20px 20px;
  flex-wrap: wrap;
  gap: 10px;
  background-color: var(--pine-teal);
}

header h1 {
  font-size: 1.5rem;
  margin: 0;
  color: white;
}

header h1 a {
  color: white;
  text-decoration: none;
  transition: text-shadow 0.2s ease;
}

header h1 a:hover {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.main-nav {
  display: flex;
  gap: 15px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.search-container {
  position: relative;
}

.search-container input {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  width: 200px;
  transition: all 0.3s ease;
}

.search-container input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-container input:focus {
  background-color: rgba(255, 255, 255, 0.3);
  outline: none;
  width: 250px;
}

/* Common button styles */
button,
.btn,
.copy-btn,
.transform-btn,
.combine-btn,
.filter-btn {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

button:hover,
.btn:hover,
.copy-btn:hover,
.transform-btn:hover,
.combine-btn:hover,
.filter-btn:hover {
  transform: translateY(-2px);
}

button:active,
.btn:active,
.copy-btn:active,
.transform-btn:active,
.combine-btn:active,
.filter-btn:active {
  transform: translateY(0);
}

/* Form elements */
input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #007bff;
  outline: none;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 1rem;
}

/* Card styles */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive typography */
h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Responsive breakpoints */
/* Small devices (landscape phones, 576px and up) */
@media (max-width: 576px) {
  header h1 {
    font-size: 1.25rem;
  }

  .container,
  /* .main-content, */
  .emoji-combiner-container,
  .font-generator-container {
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .main-nav {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    order: 3;
  }

  .search-container {
    margin-top: 10px;
    width: 100%;
    order: 2;
  }

  .search-container input,
  .search-container input:focus {
    width: 100%;
  }

  /* Emoji combiner specific */
  .emoji-selection-container {
    flex-direction: column;
    gap: 1rem;
  }

  .emoji-selection {
    width: 100%;
  }

  .combine-icon {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }

  .combinations-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  /* Fancy text specific */
  .font-style-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  /* Style name removed as requested */

  .style-text {
    width: 100%;
    padding: 0.5rem 0;
    text-align: center;
  }

  .copy-btn {
    margin-left: 0;
    width: 100%;
    padding: 0.6rem 0;
  }

  .style-filters {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 0;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  .filter-btn {
    width: auto;
    max-width: none;
    margin-bottom: 0;
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 577px) and (max-width: 768px) {
  header {
    padding: 10px 15px;
  }

  .main-nav {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    order: 3;
  }

  .search-container {
    margin-top: 10px;
    width: 100%;
    order: 2;
  }

  .search-container input,
  .search-container input:focus {
    width: 100%;
  }

  /* Emoji combiner specific */
  .emoji-selection-container {
    flex-direction: column;
    gap: 1rem;
  }

  .emoji-selection {
    width: 100%;
  }

  .combine-icon {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }

  /* Fancy text specific */
  .font-style-card {
    /* flex-direction: row; */
    align-items: center;
  }

  .style-filters {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 769px) and (max-width: 992px) {
  .container,
  /* .main-content, */
  .emoji-combiner-container,
  .font-generator-container {
    padding: 1.5rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 993px) {
  .container,
  /* .main-content, */
  .emoji-combiner-container,
  .font-generator-container {
    padding: 2rem;
  }
}

/* Dropdown Menu Styles */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown-toggle i {
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 8px 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: #333 !important;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.dropdown-item.active {
  background-color: #e8f5e9;
  color: var(--fern) !important;
  font-weight: 500;
}

/* Responsive dropdown */
@media (max-width: 768px) {
  .nav-dropdown {
    position: static;
  }

  .dropdown-menu {
    position: relative;
    width: 100%;
    box-shadow: none;
    margin-top: 5px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0;
  }

  .dropdown-item {
    padding: 10px 20px;
    color: white !important;
  }

  .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
  }
}
