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

body {
    font-family: 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

.screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* 輸入界面樣式 */
#input-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

#input-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

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

.input-container {
    text-align: center;
    max-width: 700px;
    width: 90%;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.input-container h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
    letter-spacing: -1px;
}

.input-container .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-weight: 300;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.settings-row label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
}

.settings-row select {
    padding: 8px 15px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-row select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

#text-input {
    width: 100%;
    height: 320px;
    padding: 25px;
    font-size: 1.3rem;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    resize: none;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    font-family: 'Arial', sans-serif;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

#text-input:focus {
    outline: none;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

#text-input::placeholder {
    color: #999;
    font-style: italic;
}

#play-button {
    padding: 18px 50px;
    font-size: 1.6rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24, #ff9ff3, #54a0ff);
    background-size: 300% 300%;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 0 0 rgba(255, 255, 255, 0.4);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#play-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.3),
        0 0 0 8px rgba(255, 255, 255, 0.1);
}

#play-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* 顯示界面樣式 */
#display-screen {
    background-color: #000;
    flex-direction: column;
}

.text-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 50px;
}

.line {
    font-size: 4.5rem;
    line-height: 1.8;
    margin: 10px 0;
    text-align: center;
    min-height: 8.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 100%;
    color: #666;
    opacity: 0.7;
}

.line.current-line {
    color: #fff;
    font-weight: bold;
    opacity: 1;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #666;
    font-size: 1rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .input-container {
        padding: 30px 25px;
        max-width: 90%;
    }
    
    .input-container h1 {
        font-size: 2.5rem;
    }
    
    .input-container .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .settings-row {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 1.5rem;
    }
    
    .settings-row label {
        font-size: 1rem;
    }
    
    .settings-row select {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    #text-input {
        height: 280px;
        font-size: 1.1rem;
        padding: 20px;
    }
    
    #play-button {
        padding: 15px 40px;
        font-size: 1.4rem;
    }
    
    .line {
        font-size: 3.24rem;
        margin: 8px 0;
        min-height: 6.48rem;
    }
    
    .text-display {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .input-container {
        padding: 25px 20px;
    }
    
    .input-container h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .input-container .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    #text-input {
        height: 250px;
        font-size: 1rem;
        padding: 18px;
    }
    
    #play-button {
        padding: 12px 35px;
        font-size: 1.2rem;
    }
    
    .line {
        font-size: 2.52rem;
        margin: 5px 0;
        min-height: 5.04rem;
    }
}