.headcanon-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 2rem auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.headcanon-container h1 {
    color: #2d3436;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.input-section {
    margin-bottom: 1.5rem;
}

.headcanon-container label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3436;
    font-weight: 600;
    font-size: 1.1rem;
}

.headcanon-container input,
.headcanon-container .select-styled {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #c4d3f7;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 1rem;
    background: white;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    height: 48px;
    line-height: normal;
    padding-right: 2.5rem;
}

.headcanon-container button#generateBtn {
    width: 100%;
    padding: 1rem;
    background: #2551cc;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.headcanon-container button#generateBtn:hover {
    background: #1c398a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 157, 235, 0.4);
}

.headcanon-container button#generateBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.result {
    margin-top: 1.5rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-title {
    color: #2d3436;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.content-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.initial-message {
    padding: 1rem;
    color: #666;
}

.generated-content {
    background: #3b4fd1;
    padding: 1.5rem;
    color: white;
    position: relative;
}

.generated-content.hidden {
    display: none;
}

.copy-button {
    background: transparent;
    border: none;
    padding: 8px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    width: 36px;
    height: 36px;
}

.copy-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.copy-button.copied {
    color: #3b4fd1;
}

.copy-button::after {
    content: "Copied!";
    position: absolute;
    top: -25px;
    right: 0;
    background: #3b4fd1;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.copy-button.copied::after {
    opacity: 1;
}

.generated-text {
    line-height: 1.8;
    margin: 0;
    white-space: pre-line;
}

.loading {
    display: none;
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.loading.active {
    display: block;
}

@media (max-width: 480px) {
    .headcanon-container {
        padding: 1rem;
        margin: 1rem;
    }

    .headcanon-container h1 {
        font-size: 1.5rem;
    }
    
    .result-title {
        font-size: 1.25rem;
    }
    
    .generated-content {
        padding: 1.25rem;
    }
    
    .copy-button {
        width: 32px;
        height: 32px;
    }
}