/* styles.css */

html {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: auto;
    padding: 40px 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    text-align: left;
    color: #fff;
    font-weight: normal;
    font-size: 1.8em;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.settings-icon {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    transition: color 0.2s;
}

.settings-icon:hover {
    color: #fff;
}

.input-section {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 30px;
    gap: 10px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#search-input {
    width: 50%;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #333;
    border-radius: 0;
    outline: none;
    background-color: #000;
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#search-input:focus {
    border-color: #666;
}

#search-button,
#clear-button {
    padding: 8px 16px;
    font-size: 16px;
    border: 1px solid #333;
    background-color: #000;
    color: #fff;
    cursor: pointer;
    border-radius: 0;
    transition: border-color 0.2s;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#search-button {
    background-color: rgba(31, 193, 42, 1);
    color: rgba(255, 255, 255, 1);
    border-color: rgba(31, 193, 42, 1);
}

#search-button:hover,
#clear-button:hover {
    border-color: #666;
}

#search-button:hover {
    border-color: rgba(31, 193, 42, 1);
}

/* Description Section Styling */
.description {
    max-width: 100%;
    margin: 0 0 30px 0;
    padding: 0;
    background-color: transparent;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
}

p {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ccc;
}

.description p {
    margin: 0 0 15px 0;
    color: #ccc;
    line-height: 1.7;
    font-size: 15px;
}

.description p strong {
    color: #fff;
    font-weight: 600;
}

/* API Selection Section Styling */
.api-selection {
    max-width: 100%;
    margin: 0 0 30px 0;
    padding: 0;
    background-color: transparent;
    border-left: none;
    border-radius: 0;
    box-shadow: none;
}

label {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ccc;
}

.api-selection label {
    margin-right: 10px;
    font-weight: normal;
    color: #ccc;
}

#api-selector {
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #333;
    border-radius: 0;
    outline: none;
    background-color: #000;
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#api-selector:focus {
    border-color: #666;
}

/* Removed API Key Input Section Styling */

/* Tokens and Tiles */
.tokens-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.token {
    padding: 5px 10px;
    border-radius: 15px;
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.tiles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tile {
    padding: 8px 12px;
    background-color: transparent;
    border: 1px solid #333;
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
    color: #fff;
    font-weight: normal;
    text-align: center;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile:hover {
    border-color: #666;
}

.no-synonym {
    background-color: transparent;
    color: #666;
    border-color: #333;
    cursor: default;
    opacity: 0.5;
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.8); /* Black w/ opacity */
}

.modal-content {
    background-color: #000;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid #333;
    border-radius: 0;
    width: 90%;
    max-width: 500px;
    box-shadow: none;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 24px;
    font-weight: normal;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.modal-content h3 {
    color: #ccc;
    font-size: 18px;
    margin: 0 0 15px 0;
    font-weight: normal;
}

.settings-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.settings-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: normal;
}

.input-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 0;
    font-size: 14px;
    background-color: #000;
    color: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.input-group input[type="text"]:focus {
    border-color: #666;
    outline: none;
}

.debug-setting {
    margin: 10px 0;
}

.debug-setting label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #ccc;
}

.debug-setting input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#save-settings {
    width: 100%;
    padding: 12px;
    background-color: #000;
    color: #fff;
    border: 1px solid #333;
    border-radius: 0;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    transition: border-color 0.2s;
}

#save-settings:hover {
    border-color: #666;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: #fff;
}

/* Debug Output Styling */
.debug-output {
    margin-top: 20px;
    padding: 15px;
    background-color: #000;
    border: 1px solid #333;
    border-radius: 0;
    font-family: monospace;
    color: #ccc;
}

.debug-output h3 {
    margin-top: 0;
    color: #fff;
    font-weight: normal;
}

#debug-content {
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Homepage Navigation */
.home-nav {
    margin-bottom: 30px;
}

.home-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-nav li {
    margin-bottom: 10px;
}

.home-nav a {
    color: #ccc;
    text-decoration: underline;
    text-decoration-color: #666;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.home-nav a:hover {
    color: #fff;
    text-decoration-color: #999;
}

.home-content {
    margin-top: 30px;
}

@media (max-width: 600px) {
    #search-input {
        width: 60%;
    }

    #search-button,
    #clear-button {
        padding: 10px 15px;
    }
}
