* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5eb;
    position: relative;
}

body.dark-mode .header {
    border-bottom-color: #444;
}

.header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

body.dark-mode .header h1 {
    color: #ffffff;
}

.header h1 i {
    color: #3498db;
    margin-right: 8px;
}

body.dark-mode .header h1 i {
    color: #4dabf7;
}

.version {
    color: #7f8c8d;
    font-size: 0.85rem;
}

body.dark-mode .version {
    color: #b0b0b0;
}

.theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: #0080FF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s, transform 0.2s;
}

body.dark-mode .theme-toggle {
    background: #ff9800;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

body.dark-mode .theme-toggle:hover {
    background: #ffb74d;
}

.main-content {
    flex: 1;
    margin-bottom: 25px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.chat-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 70vh;
    min-height: 500px;
    width: 90%;
    max-width: 1000px;
}

body.dark-mode .chat-container {
    background-color: #2d2d2d;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chat-header {
    background-color: #0088FF;
    color: white;
    padding: 18px 25px;
}

body.dark-mode .chat-header {
    background-color: #0059b3;
}

.chat-header h2 {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    margin: 0;
}

.chat-header h2 i {
    margin-right: 10px;
}

.chat-messages {
    flex: 1;
    padding: 20px 25px;
    overflow-y: auto;
    background-color: #fafafa;
}

body.dark-mode .chat-messages {
    background-color: #3a3a3a;
}

.message {
    margin-bottom: 15px;
    padding: 14px 18px;
    border-radius: 10px;
    max-width: 85%;
}

.message.bot {
    background-color: #e3f2fd;
    border-left: 4px solid #0088FF;
    margin-right: auto;
}

body.dark-mode .message.bot {
    background-color: #2c3e50;
    border-left-color: #0059b3;
}

.message.user {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    margin-left: auto;
}

body.dark-mode .message.user {
    background-color: #1b5e20;
    border-left-color: #2e7d32;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #666;
}

body.dark-mode .message-header {
    color: #b0b0b0;
}

.sender {
    font-weight: bold;
}

.time {
    font-size: 0.8rem;
}

.message-content {
    line-height: 1.5;
    font-size: 0.95rem;
}

.chat-input-area {
    padding: 20px 25px;
    background-color: white;
    border-top: 1px solid #eee;
}

body.dark-mode .chat-input-area {
    background-color: #2d2d2d;
    border-top-color: #444;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background-color: white;
    color: #333;
}

body.dark-mode .input-group input {
    background-color: #444;
    border-color: #666;
    color: #ffffff;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

body.dark-mode .input-group input:focus {
    border-color: #4dabf7;
    box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
}

.input-group button {
    padding: 14px 22px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.input-group button i {
    margin-right: 8px;
}

#send-btn {
    background-color: #0080FF;
    color: white;
}

body.dark-mode #send-btn {
    background-color: #0059b3;
}

#send-btn:hover {
    background-color: #0066CC;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}

body.dark-mode #send-btn:hover {
    background-color: #1a73e8;
}

#clear-btn {
    background-color: #e74c3c;
    color: white;
}

body.dark-mode #clear-btn {
    background-color: #c62828;
}

#clear-btn:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.3);
}

body.dark-mode #clear-btn:hover {
    background-color: #d32f2f;
}

.footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e1e5eb;
    width: 100%;
}

body.dark-mode .footer {
    border-top-color: #444;
}

.important-notice {
    padding: 12px 0;
    font-size: 0.7rem;
    color: #7f8c8d;
    line-height: 1.4;
    width: 100%;
}

body.dark-mode .important-notice {
    color: #b0b0b0;
}

.notice-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

.notice-content p {
    margin-bottom: 8px;
}

.notice-content a {
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
}

body.dark-mode .notice-content a {
    color: #4dabf7;
}

.notice-content a:hover {
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
    .chat-container {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px 15px;
    }
    .header h1 {
        font-size: 1.6rem;
    }
    .chat-container {
        height: 65vh;
        min-height: 450px;
        border-radius: 8px;
        width: 100%;
    }
    .chat-header {
        padding: 15px 20px;
    }
    .chat-messages {
        padding: 15px 20px;
    }
    .chat-input-area {
        padding: 15px 20px;
    }
    .input-group {
        flex-direction: column;
    }
    .input-group button {
        width: 100%;
        padding: 12px 18px;
    }
    .message {
        max-width: 90%;
        padding: 12px 15px;
    }
    .notice-content {
        padding: 0 10px;
    }
    .important-notice {
        font-size: 0.65rem;
    }
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px 10px;
    }
    .header h1 {
        font-size: 1.4rem;
    }
    .header .version {
        font-size: 0.8rem;
    }
    .chat-container {
        height: 60vh;
        min-height: 400px;
    }
    .chat-header h2 {
        font-size: 1.2rem;
    }
    .message-content {
        font-size: 0.9rem;
    }
    .input-group input {
        font-size: 0.9rem;
        padding: 12px 15px;
    }
    .important-notice {
        font-size: 0.6rem;
    }
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

.continue-btn {
    background-color: #0080FF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: all 0.3s;
}

body.dark-mode .continue-btn {
    background-color: #0059b3;
}

.continue-btn:hover {
    background-color: #0066CC;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .continue-btn:hover {
    background-color: #1a73e8;
}

body.dark-mode .notice-content a:visited,
body.dark-mode .message-content a:visited {
    color: #d4b5ff !important;
}