/* Main Styles for BYD Charging Station AI Customer Service */

:root {
    /* BYD Official Website Colors */
    --primary-dark: #2b2b2b;
    --primary-gray: #4a4a4a;
    --background-light: #f8f8f8;
    --background-white: #ffffff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --border-light: #e5e5e5;
    --accent-red: #e60012;
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--primary-dark);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-screen p {
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Error Screen */
.error-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--primary-dark);
}

.error-content {
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.error-content h2 {
    color: var(--accent-red);
    margin-bottom: 16px;
    font-weight: 500;
}

.error-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-weight: 300;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
}

.btn-primary:hover {
    background-color: #cc0010;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-content {
        padding: 20px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .loading-screen p,
    .error-content p {
        font-size: 14px;
    }
    
    .error-content h2 {
        font-size: 18px;
    }
}

/* PC端优化 */
@media (min-width: 769px) {
    .loading-screen p {
        font-size: 16px;
    }
    
    .error-content {
        padding: 60px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 40px;
        font-size: 16px;
    }
}

/* Accessibility */
button:focus,
textarea:focus,
input:focus {
    outline: 2px solid var(--accent-red);
    outline-offset: 2px;
}


/* TTS Toggle Button - 增强视觉差异 */
.tts-toggle {
    background: transparent;
    border: none;
    color: var(--background-white);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    position: relative;
}

.tts-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 关闭状态 - 静音显示，添加斜线和低透明度 */
.tts-toggle.muted {
    opacity: 0.4;
}

/* 静音时隐藏声波 */
.tts-toggle.muted svg path:last-child {
    display: none;
}

/* 添加斜线标记（静音） */
.tts-toggle.muted::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 30px;
    background-color: var(--accent-red);
    transform: rotate(-45deg);
    top: 50%;
    left: 50%;
    margin-left: -1px;
    margin-top: -15px;
}

.tts-toggle svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}
