@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

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

body {
    background: linear-gradient(135deg, #ffe4e1 0%, #ffc0cb 50%, #ffb6c1 100%);
    color: #8b4a7f;
    font-family: 'Noto Sans JP', 'Roboto Mono', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 可愛い装飾要素 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 192, 203, 0.3) 0%, transparent 25%),
        radial-gradient(circle at 80% 40%, rgba(255, 182, 193, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 40% 80%, rgba(255, 228, 225, 0.4) 0%, transparent 35%);
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(135deg, #ff6b9d, #ffa8cc);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 0.95em;
    font-weight: 600;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 90px;
}

.btn::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: -30px;
    transform: translateY(-50%);
    font-size: 1.2em;
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: calc(100% + 10px);
}

.btn:hover {
    background: linear-gradient(135deg, #ff9ec7, #ffcce5);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0px);
}

.btn:disabled {
    background: linear-gradient(135deg, #d3d3d3, #e0e0e0);
    color: #999;
    cursor: not-allowed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: none;
}

.btn.stop {
    background: linear-gradient(135deg, #c77dff, #e0aaff);
    box-shadow: 0 4px 15px rgba(199, 125, 255, 0.3);
}

.btn.stop:hover {
    background: linear-gradient(135deg, #d9a7ff, #f0d9ff);
    box-shadow: 0 6px 20px rgba(199, 125, 255, 0.5);
}

.status {
    text-align: center;
    font-size: 1.1em;
    font-weight: 500;
    margin: 15px 0;
    min-height: 30px;
    color: #8b4a7f;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.status.listening {
    color: #ff6b9d;
    animation: pulse-cute 2s infinite;
}

.status.stopped {
    color: #c08497;
}

@keyframes pulse-cute {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(255, 107, 157, 0.6));
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05);
        filter: drop-shadow(0 0 12px rgba(255, 107, 157, 0.8));
    }
}

.display-area {
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #ffb3d9;
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    min-height: 200px;
    box-shadow: 
        0 8px 25px rgba(255, 107, 157, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
}

.display-area::before {
    content: '💕';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    opacity: 0.6;
}

.current-section {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.history-area {
    background: rgba(255, 255, 255, 0.85);
    border: 3px solid #e0aaff;
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 
        0 8px 25px rgba(199, 125, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
}

.history-area::before {
    content: '📝';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    opacity: 0.6;
}

.history-section {
    margin-top: 0;
}

.section-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #8b4a7f;
    margin-bottom: 15px;
    letter-spacing: 1px;
    position: relative;
    padding-left: 30px;
}

.section-title::before {
    content: '🌸';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.current-text {
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.8), rgba(255, 228, 238, 0.6));
    border-left: 4px solid #ff6b9d;
    padding: 20px;
    font-size: 2.5em;
    line-height: 1.4;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 15px 15px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #8b4a7f;
    font-weight: 500;
}

.interim-text {
    color: #c08497;
    font-style: italic;
    opacity: 0.8;
}

.history-text {
    background: linear-gradient(135deg, rgba(240, 230, 255, 0.8), rgba(250, 240, 255, 0.6));
    border: 2px solid #e0aaff;
    padding: 20px;
    font-size: 1.3em;
    line-height: 1.6;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: #8b4a7f;
}

.warning {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.9), rgba(255, 204, 128, 0.8));
    border: 2px solid #ffb347;
    color: #8b5a00;
    padding: 15px;
    margin: 20px 0;
    border-radius: 15px;
    font-weight: 500;
    display: none;
    box-shadow: 0 4px 15px rgba(255, 179, 71, 0.3);
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 192, 203, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b9d, #ffa8cc);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff9ec7, #ffcce5);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .current-text {
        font-size: 1.8em;
        height: 120px;
        line-height: 1.3;
        overflow-y: auto;
        padding: 15px;
    }
    
    .history-text {
        font-size: 1.1em;
        height: 200px;
    }
    
    .controls {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
        margin: 15px 0;
    }
    
    .btn {
        width: 75px;
        padding: 10px 15px;
        font-size: 0.85em;
        min-width: 75px;
    }
    
    .display-area {
        padding: 20px;
        min-height: 150px;
    }
    
    .history-area {
        padding: 20px;
    }
    
    .current-section {
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .section-title {
        font-size: 1.2em;
        padding-left: 25px;
    }
}