:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc1e9;
    --background-color: #f7f9fc;
    --text-color: #333;
    --light-gray: #eaeef3;
    --medium-gray: #c4c9d4;
    --dark-gray: #686f7f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

h1 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}

.subtitle {
    color: var(--dark-gray);
    font-size: 1rem;
    margin-bottom: 1rem;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.color-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.color-preview {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    border: 1px solid var(--medium-gray);
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.converter-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

.converter-column {
    flex: 1;
    min-width: 250px;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

input[type="text"], input[type="number"], input[type="color"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="color"]:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 193, 233, 0.2);
}

input[type="color"] {
    height: 50px;
    padding: 2px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--secondary-color);
}

.color-history {
    margin-top: 2rem;
}

.history-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.history-item {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--medium-gray);
    transition: transform 0.2s;
}

.history-item:hover {
    transform: scale(1.1);
}

.faq-section {
    margin-top: 1rem;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-question {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.faq-answer {
    color: var(--dark-gray);
    padding-left: 1rem;
    border-left: 3px solid var(--light-gray);
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .converter-column {
        flex: 100%;
    }

    h1 {
        font-size: 1.6rem;
    }

    .color-preview {
        width: 150px;
        height: 150px;
    }
}

.content-section {
}

.content-section {
    margin-top: 1rem;
}

.content-section h2 {
  margin-bottom: 1.5rem;
}

.content-section p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

.content-section ul {
  list-style-type: disc;
  list-style-position: outside;
  padding-left: 1.8em;
  margin-bottom: 1rem;
}

.content-section ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 1.5em;
}

.content-section li {
  line-height: 1.8;
  margin-bottom: 0.8rem;
  padding-left: 0.2em;
}

.content-section ul ul li {
    margin-bottom: 0.5rem;
}


.content-section > *:last-child {
    margin-bottom: 0;
}

.faq-item {
  margin-bottom: 2rem;
}

.faq-section .faq-item:last-child {
    margin-bottom: 0;
}


.faq-question {
  margin-bottom: 0.8rem;
}

.faq-answer {
  line-height: 1.8;
}


.faq-answer p {
  margin-bottom: 1rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  list-style-type: disc;
  list-style-position: outside;
  padding-left: 1em;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.faq-answer ul:last-child {
  margin-bottom: 0;
}

.faq-answer li {
  margin-bottom: 0.8rem;
}

.faq-answer li:last-child {
    margin-bottom: 0;
}


.faq-answer ul ul {
  list-style-type: circle;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 1.2em;
}
.faq-answer ul ul li {
    margin-bottom: 0.5rem;
}
.faq-answer ul ul li:last-child {
    margin-bottom: 0;
}

.faq-item {
  margin-bottom: 2rem;
}

.faq-section .faq-item:last-child {
    margin-bottom: 0;
}


.faq-question {
  margin-bottom: 0.8rem;
}

.faq-answer {
  line-height: 1.8;
}