* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'Pusia';
    src: url('../fonts/pusia-bold.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Lilita';
    src: url('../fonts/lilita-one.ttf') format('truetype');
    font-display: swap;
}

body {
    font-family: sans-serif;
    background: #0f0f11;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    min-height: 100vh;
}

h1 {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #ff1a1a, #ff8c1a, #ffff1a, #1aff4b, #1ad4ff, #1a5eff, #9a1aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-align: center;
}

.description {
    max-width: 560px;
    margin-bottom: 1.2rem;
    color: #aaa;
    font-size: 0.95rem;
    text-align: center;
}

.input-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 1.2rem;
}

textarea {
    width: 100%;
    min-height: 48px;
    background: #1a1b1f;
    color: #e0e0e0;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    padding: 0.8rem;
    font-family: sans-serif;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

textarea::placeholder {
    color: #555;
    font-family: sans-serif;
}

.text-preview {
    width: 100%;
    min-height: 80px;
    background: #1a1b1f;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    flex-wrap: wrap;
}

.styled-text {
    font-family: 'Pusia';
    font-size: 2rem;
    width: 100%;
}

.color-inputs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    transition: transform 0.3s ease;
}

input[type="color"] {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: transform 0.2s ease;
    box-shadow: none;
}

input[type="color"]:hover,
input[type="color"]:focus {
    transform: scale(1.15);
    outline: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 12px;
}

input[type="color"]::-webkit-color-swatch {
    border-radius: 12px;
    border: none;
}

input[type="color"]::-moz-color-swatch {
    border-radius: 12px;
    border: none;
}

.preset-container {
    width: 100%;
    max-width: 600px;
    background: #1a1b1f;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    user-select: none;
    flex-wrap: wrap;
}

.preset-btn {
    width: 48px;
    height: 48px;
    background-size: 300% 100%;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    border-radius: 8px;
}

.preset-btn:hover {
    transform: scale(1.15);
}

.preset-btn.active {
    transform: scale(1.2);
}

.result-group {
    display: flex;
    gap: 0.8rem;
    width: 100%;
    max-width: 600px;
    align-items: center;
    margin-top: 0.6rem;
}

#colorCode {
    flex: 1;
    padding: 0.8rem;
    background: #1a1b1f;
    color: #e0e0e0;
    border: 1px solid #2a2b30;
    border-radius: 8px;
    font-family: 'Roboto Mono', monospace;
    outline: none;
}

.btn {
    background: linear-gradient(135deg, #5c7cfa, #3f52e8);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    background: linear-gradient(135deg, #748efa, #5a68f5);
    transform: scale(1.03);
}

@media (max-width: 600px) {
    .color-inputs {
        gap: 1rem;
    }

    .preset-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .preset-btn {
        width: 48px;
        height: 48px;
    }

    .result-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
