body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    background-color: #2c2c2c;
    margin: 0;
    padding: 0;
}

.container {
    width: min(100%, 720px);
    margin: 2.5rem auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
}

.result-group h3 {
    color: #c7c7c7;
}
.controls-row {
    font-size: 1.05rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;

    max-width: 720px;
    margin: 1.5rem;
}

.set {
    color: rgb(230, 212, 255);
}
.transpose-control{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#transpose-select {
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
}

.invert-control {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#invert-select {
    padding: 0.4rem 0.6rem;
    font-size: 0.95rem;
}

button {
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
}

.display-panel {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;

    background-color: #1e1e1e;
    border-radius: 12px;

    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.display-panel .result-line {
    display: flex;
    align-items: center;
    margin-bottom: 0.7rem;
    color: #f5f5f5;
}

.display-panel .result-line:last-child {
    margin-bottom: 0;
}

.display-panel span:not(.label) {
    font-family: "Courier New", monospace;
    font-size: 1.05rem;
    letter-spacing: 0.0rem;
}

.display-panel .label {
    width: 160px;
    color: #bbbbbb;
    font-weight: 500;
}

.keyboard-section {
    margin-top: 2rem;
}

.pc-keyboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.pc-key {
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background-color: #2c2c2c;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.pc-key:hover {
    transform: scale(1.05);
    background-color: #9355f6;
    
}

.pc-key.active {
    background-color: #5d31a3;
}

.footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.footer a {
    color: #555555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: #000;
}

@media (max-width: 480px) {
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    #clear-btn,
    #transpose-select {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .display-panel .result-line {
        flex-direction: column;
        align-self: flex-start;
        gap: 0.2rem;
    }

    .display-panel .label {
        width: auto;
        font-size: 0.8rem;
    }

    .display-panel span:not(.label) {
        font-size: 1rem;
    }

    .input-section {
        flex-direction: column;
        gap: 0.75rem;
    }

    input,
    button,
    select {
        width: 100%;
        font-size: 1rem;
    }

    .pc-keyboard {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .pc-key {
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .transpose-indicator {
        margin-left: 0;
        margin-top: 0.5rem;
        display: inline-block;
    }
}

@media (max-width: 900px) {
    .container {
        padding: 1.5rem;
    }

    .pc-keyboard {
        grid-template-columns: repeat(4, 1fr);
    }
}