:root {
  --font-main: 'Inter', system-ui, sans-serif;
  --bg-gradient-start: #f0f2f5;
  --bg-gradient-end: #e6e9ee;
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-border: rgba(255, 255, 255, 0.9);
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --accent-color: #3b82f6;
  --button-bg: #edf2f7;
  --button-shadow: 5px 5px 10px #d4d9e0, -5px -5px 10px #ffffff;
  --button-shadow-inset: inset 5px 5px 10px #d4d9e0, inset -5px -5px 10px #ffffff;
}

body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background-color: var(--bg-gradient-start);
}

.background-gradient {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(120deg, var(--bg-gradient-start), var(--bg-gradient-end));
  z-index: -1;
}

.app-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; background: var(--card-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
}
.logo { font-weight: 700; font-size: 1.25rem; color: var(--text-primary); text-decoration: none; }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

@media (max-width: 768px) {
    .app-nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

main {
    padding: 1rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.tool-header h1 { font-size: 2rem; font-weight: 700; }
.tool-header p { font-size: 1rem; color: var(--text-secondary); }

.app-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem; /* Add horizontal padding */
}

.controls-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    align-self: start;
    width: auto; /* Remove fixed width */
}

.controls-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.control-group { margin-bottom: 2rem; }
.control-group h3 { font-size: 1rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 1rem; }

#selected-emojis-display {
    display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem;
    background: var(--button-bg); border-radius: 12px; min-height: 80px;
    box-shadow: var(--button-shadow-inset);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#gradient-output-css {
    background: var(--button-bg);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--button-shadow-inset);
    margin-bottom: 1rem;
}

#gradient-output-css pre, #gradient-output-css code {
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.action-button {
    width: 100%; padding: 1rem; border-radius: 12px; background: var(--accent-color);
    border: none; cursor: pointer; font-size: 1rem; color: white;
    font-weight: 500; transition: all 0.2s ease-in-out;
}
.action-button:hover { filter: brightness(1.1); }

.preview-section {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

#gradient-preview {
    width: 100%;
    height: 100%;
    min-height: 60vh;
    transition: background 0.5s ease;
}

.app-footer { text-align: center; padding: 2rem; color: var(--text-secondary); font-size: 0.875rem; }

.toast { /* Basic toast styles */
    position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%);
    padding: 1rem 2rem; border-radius: 8px; background-color: var(--accent-color);
    color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.2); transition: bottom 0.5s ease-in-out;
}
.toast.show { bottom: 30px; }

emoji-picker { width: 100%; --background: transparent; }

@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; }
    main { padding: 0.5rem; }
    .tool-header h1 { font-size: 1.75rem; }
    .tool-header p { font-size: 0.9rem; }
}

.content-section {
    width: 100%;
    max-width: 900px;
    margin-bottom: 4rem;
    padding: 0 1rem; /* Add horizontal padding for smaller screens */
}

.content-section p, .content-section li {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.content-section a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.how-to-list {
    list-style: none;
    counter-reset: how-to-counter;
    padding-left: 0;
}

.how-to-list li {
    counter-increment: how-to-counter;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.how-to-list li::before {
    content: counter(how-to-counter);
    margin-right: 1rem;
    font-size: 1rem;
    font-weight: 700;
    background-color: var(--accent-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--button-bg);
    border-radius: 12px;
    box-shadow: var(--button-shadow);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding: 0 1.5rem;
}

.faq-answer p {
    padding-bottom: 1.5rem;
    font-size: 1rem;
}