* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #232F3E;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 820px;
}

.header {
    text-align: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 42px;
    background: linear-gradient(135deg, #FF9900, #ffb84d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.header p {
    color: #95a5b5;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card {
    background: #1a2533;
    border-radius: 16px;
    padding: 32px;
    border: 1px solid #2a3a4a;
}

.status {
    background: #1a2a3a;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
    border: 1px solid #2a3a4a;
    transition: all 0.3s;
    color: #95a5b5;
}

.status.listening {
    border-color: #FF9900;
    color: #FF9900;
}

.status.error {
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.status.processing {
    border-color: #FF9900;
    color: #FF9900;
}

.section {
    margin-bottom: 22px;
}

.section h2 {
    margin-bottom: 8px;
    font-size: 17px;
    color: #8fa5b8;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.input-row input {
    flex: 1;
    background: #1a2a3a;
    border: 1px solid #2a3a4a;
    border-radius: 10px;
    padding: 14px 18px;
    color: #e2e8f0;
    font-size: 17px;
    outline: none;
    transition: border-color 0.2s;
}

.input-row input:focus {
    border-color: #FF9900;
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.15);
}

.input-row input::placeholder {
    color: #4a5a6a;
}

.box {
    background: #1a2a3a;
    border-radius: 12px;
    padding: 20px;
    min-height: 80px;
    line-height: 1.7;
    color: #f1f5f9;
    border: 1px solid #2a3a4a;
    font-size: 18px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.box:empty::before {
    content: attr(data-placeholder);
    color: #4a5a6a;
}

.answer-box {
    font-size: 19px;
    min-height: 80px;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

button {
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.15s;
    flex: 1;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

button .icon {
    font-size: 16px;
    line-height: 1;
}

button .label {
    line-height: 1;
}

button.primary {
    background: linear-gradient(135deg, #FF9900, #e88b00);
    padding: 12px 22px;
    flex: 0 0 auto;
    font-size: 15px;
    color: #232F3E;
    font-weight: 600;
}

button.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffaa22, #FF9900);
    transform: translateY(-1px);
}

button.primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-mic {
    background: #1a2a3a;
    border: 1px solid #2a3a4a;
}

.btn-mic:hover:not(:disabled) {
    background: #2a3a4a;
    border-color: #3a4a5a;
    transform: translateY(-1px);
}

.btn-mic.listening {
    background: #2a1a00;
    border-color: #FF9900;
    animation: pulse 1.5s ease-in-out infinite;
}

.btn-pause {
    background: #1a2a3a;
    border: 1px solid #2a3a4a;
}

.btn-pause:hover:not(:disabled) {
    background: #2a3a4a;
    border-color: #3a4a5a;
    transform: translateY(-1px);
}

.btn-pause.resumed {
    background: #2a1a00;
    border-color: #FF9900;
}

.btn-clear {
    background: transparent;
    border: 1px solid #2a3a4a;
    color: #7a8a9a;
}

.btn-clear:hover:not(:disabled) {
    background: #1a2a3a;
    border-color: #4a5a6a;
    color: #e2e8f0;
    transform: translateY(-1px);
}

button:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255, 153, 0, 0); }
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 153, 0, 0.3);
    border-top-color: #FF9900;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 28px;
    }

    .card {
        padding: 20px;
    }

    .buttons {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .input-row {
        flex-direction: column;
    }

    .box {
        font-size: 16px;
    }

    .answer-box {
        font-size: 17px;
    }
}
