﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-color: #fcfaf5;
    --main-blue: #4a90e2;
    --accent-red: #e94e77;
    --accent-green: #55b3b1;
    --text-color: #333;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
}

body {
    background-color: var(--bg-color);
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: var(--text-color);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 800px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
}

header h1 {
    text-align: center;
    color: var(--main-blue);
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    padding: 10px 0;
    letter-spacing: 0.1em;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.control-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    min-width: 90px;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.start { background-color: var(--main-blue); color: white; }
.stop { background-color: var(--accent-red); color: white; }
.save { background-color: var(--accent-green); color: white; margin-left: auto; }

.btn:active { transform: scale(0.98); }
.btn:disabled { background-color: #d1d1d1 !important; color: #f0f0f0 !important; cursor: not-allowed; }

.status-container {
    height: 52px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.status-text {
    font-size: 1.1rem;
    color: #666;
}

.text-output-container {
    flex: 1;
    min-height: 0;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 100%;
    padding: 15px;
    font-size: 1.1rem;
    line-height: 1.7;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    resize: none;
    outline: none;
    background-color: var(--card-bg);
}

.dot-typing::after {
    content: '';
    display: inline-block;
    width: 2em;
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}