:root {
    --primary-color: #6200ee;
    --primary-light: #b794f6;
    --danger-color: #cf6679;
    --success-color: #03dac6;
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #ffffff;
    --text-secondary: #b0b0b0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-weight: 300;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
}

.recorder-container {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    margin-bottom: 2rem;
}

.visualizer {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2rem;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.visualizer.recording {
    opacity: 1;
}

.bar {
    width: 6px;
    height: 15%;
    background-color: var(--primary-light);
    border-radius: 3px;
    transition: height 0.05s ease-out;
}

.record-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    outline: none;
}

.record-btn:hover {
    transform: scale(1.05);
    background-color: #7c4dff;
}

.record-btn.recording {
    background-color: var(--danger-color);
    animation: pulse 2s infinite;
}

.record-btn .icon {
    width: 20px;
    height: 20px;
    background-color: white;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z'/%3E%3Cpath d='M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z'/%3E%3C/svg%3E") no-repeat center;
    mask-size: contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z'/%3E%3Cpath d='M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    margin-bottom: 4px;
}

.record-btn.recording .icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: white;
    mask: none;
    -webkit-mask: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(207, 102, 121, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(207, 102, 121, 0); }
    100% { box-shadow: 0 0 0 0 rgba(207, 102, 121, 0); }
}

.status {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-container {
    width: 100%;
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.hidden {
    display: none;
}

.verdict {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.verdict .label {
    font-size: 1.2rem;
    font-weight: 500;
}

.verdict .value {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.value.yes {
    background-color: rgba(207, 102, 121, 0.2);
    color: var(--danger-color);
}

.value.no {
    background-color: rgba(3, 218, 198, 0.2);
    color: var(--success-color);
}

.inference-time {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.predictions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pred-item {
    display: flex;
    flex-direction: column;
}

.pred-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.pred-bar-bg {
    width: 100%;
    height: 8px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.pred-bar-fill {
    height: 100%;
    background-color: var(--primary-light);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease-out;
}

/* Tooltip styles */
.tooltip-trigger {
    position: relative;
    cursor: help;
}

.tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 12px;
    background-color: #2d2d2d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: normal;
    width: 300px;
    max-width: 80vw;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    line-height: 1.5;
}

.tooltip.tooltip-left {
    left: auto;
    right: 0;
}

.tooltip-trigger:hover .tooltip {
    display: block;
}

.tooltip strong {
    color: var(--text-color);
}

.tooltip:empty {
    display: none;
}
