:root {
    --bg-color: #0f0f0f;
    --panel-bg: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #00ff88;
    --danger-color: #ff3333;
    --idle-color: #444444;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-color);
}

* { 
    box-sizing: border-box; 
    font-family: 'Segoe UI', sans-serif; 
    -webkit-tap-highlight-color: transparent;
}

body { 
    color: var(--text-color); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

main { 
    position: relative;
    background: var(--panel-bg); 
    width: 100%; 
    height: 100%; 
    max-width: 500px; 
    padding: 20px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    overflow: hidden;
}

h1 { 
    text-align: center;
    font-size: 1.3rem;
    color: #aaa;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.status-main-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid #222;
    margin-bottom: 10px;
}

#status-indicator {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.status-idle { color: var(--idle-color); }
.status-recording { 
    color: var(--danger-color); 
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.6);
    animation: pulse 1.2s infinite; 
}
.status-playing { 
    color: var(--accent-color); 
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6); 
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.central-info { display: flex; flex-direction: column; gap: 10px; }
.info-block { display: flex; flex-direction: column; align-items: center; }

#clock-display { font-size: 1.4rem; color: #aaa; font-family: monospace; }
#time-remaining { font-size: 3rem; color: var(--accent-color); font-family: monospace; line-height: 1; }

.label-small { font-size: 0.65rem; color: #888; letter-spacing: 1px; margin-bottom: 2px; }

.progress-bar-container { width: 100%; height: 6px; background: #000; border-radius: 3px; margin: 15px 0; overflow: hidden; }
.progress-fill { height: 100%; width: 100%; transition: width 0.1s linear; }
.fill-ready { background: #333; }
.fill-recording { background: var(--danger-color); }
.fill-playing { background: var(--accent-color); }

.vu-meter-container { background: #0a0a0a; padding: 10px; border-radius: 8px; border: 1px solid #333; }
.vu-scale { display: flex; justify-content: space-between; font-size: 0.55rem; color: #444; margin-bottom: 4px; }
.vu-track { width: 100%; height: 15px; background: #111; position: relative; overflow: hidden; }
.vu-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000); }
.vu-peak { width: 2px; height: 100%; background: #fff; position: absolute; left: 0%; transition: left 0.05s linear; }

.controls-section { display: flex; flex-direction: column; gap: 10px; }
.control-group { display: flex; justify-content: space-between; align-items: center; background: #252525; padding: 12px; border-radius: 8px; font-size: 0.8rem; }
select { background: #000; color: #fff; border: 1px solid #444; padding: 5px; border-radius: 4px; }
.btn-action { background: #333; color: #fff; padding: 15px; border-radius: 8px; font-weight: bold; border: 1px solid #444; cursor: pointer; text-transform: uppercase; }

.file-group { flex-direction: column; align-items: flex-start; gap: 8px; }
.file-group-header { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.file-input-wrapper { display: flex; align-items: center; gap: 10px; width: 100%; }
.hidden-input { display: none; }
.btn-file { background: #444; color: #fff; padding: 6px 10px; border-radius: 4px; border: 1px solid #555; cursor: pointer; font-size: 0.75rem; text-transform: uppercase; }
.btn-reset { background: transparent; color: var(--danger-color); border: 1px solid var(--danger-color); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; cursor: pointer; }
.file-label { font-size: 0.75rem; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; text-transform: uppercase; }

.dtmf-result-box {
    margin-top: 10px;
    padding: 10px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    text-align: center;
}

#dtmf-result {
    font-size: 1rem;
    color: #00ff88;
    margin-top: 5px;
    font-weight: bold;
    min-height: 1.2em;
}

.dtmf-debug {
    margin-top: 10px;
    font-size: 0.7rem;
    color: #ccc;
    background: #000;
    padding: 8px;
    border: 1px solid #333;
    border-radius: 6px;
}

footer { border-top: 1px solid #333; padding-top: 10px; font-size: 0.7rem; color: #555; font-weight: bold; text-align: center; }