/* --- Wrapper (Matches Stopwatch Theme) --- */
#mc-wrapper {
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background-color: #111827; /* Gray 900 */
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 2px solid #374151; /* Gray 700 */
    color: white;
    gap: 20px;
}

/* --- Display Area --- */
.mc-display-container {
    background-color: #000;
    border: 4px solid #333;
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
}

/* Glass reflection effect */
.mc-display-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), transparent);
    pointer-events: none;
}

.mc-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    border-bottom: 2px solid #374151;
    padding-bottom: 5px;
    width: 100%;
}

.mc-output-text {
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 1.5rem;
    color: #10b981; /* Retro Green */
    text-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    line-height: 1.6;
    word-break: break-word;
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Space between morse letters */
    overflow-y: auto;
    max-height: 200px;
}

.mc-output-text.placeholder {
    color: #374151; /* Dim gray */
    text-shadow: none;
    font-size: 1rem;
    align-self: center;
    margin-top: 30px;
}

/* Scrollbar for output */
.mc-output-text::-webkit-scrollbar { width: 8px; }
.mc-output-text::-webkit-scrollbar-track { background: #111; }
.mc-output-text::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 4px; }

/* Individual Character Styling */
.mc-char {
    transition: all 0.1s;
    padding: 2px 4px;
    border-radius: 2px;
}

.mc-char.active {
    background-color: #10b981;
    color: #000;
    text-shadow: none;
    box-shadow: 0 0 10px #10b981;
}

.mc-word-break {
    color: #3b82f6; /* Blue for separators */
    margin: 0 10px;
}

/* Status Light (TX LED) */
.mc-status-light {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    background-color: #374151;
    border-radius: 50%;
    border: 1px solid #111;
    transition: background-color 0.05s;
}

.mc-status-light.active {
    background-color: #ef4444; /* Red TX light */
    box-shadow: 0 0 10px #ef4444;
}

/* --- Input Section --- */
.mc-input-section {
    width: 100%;
}

.mc-textarea {
    width: 100%;
    background-color: #1f2937; /* Gray 800 */
    border: 1px solid #374151;
    color: #d1d5db; /* Gray 300 */
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 1rem;
    padding: 15px;
    border-radius: 6px;
    height: 100px;
    resize: vertical;
    outline: none;
    line-height: 1.4;
    transition: all 0.2s;
    text-transform: uppercase;
}

.mc-textarea:focus {
    border-color: #3b82f6; /* Blue focus */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    color: white;
}

.mc-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Controls --- */
.mc-controls {
    display: flex;
    gap: 15px;
    width: 100%;
}

.mc-btn {
    flex: 1;
    padding: 15px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 4px 0 rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.mc-btn:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: none;
}

.mc-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(100%);
    box-shadow: none;
    transform: translateY(2px);
}

.mc-btn.play {
    background-color: #10b981; /* Green */
    color: #064e3b;
    border-bottom: 4px solid #059669;
}

.mc-btn.stop {
    background-color: #ef4444; /* Red */
    color: #7f1d1d;
    border-bottom: 4px solid #b91c1c;
}

.mc-btn.clear {
    background-color: #f59e0b; /* Yellow */
    color: #78350f;
    border-bottom: 4px solid #d97706;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .mc-controls {
        flex-direction: column;
    }
}