/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 95vw;  /* 使用视口宽度的95% */
    width: 100%;
    margin: 0 auto;
}

/* 在大屏幕上限制最大宽度，保持可读性 */
@media (min-width: 2560px) {
    .container {
        max-width: 2400px;  /* 2K显示器 */
    }
}

@media (min-width: 1920px) and (max-width: 2559px) {
    .container {
        max-width: 1800px;  /* 1080p显示器 */
    }
}

@media (min-width: 1440px) and (max-width: 1919px) {
    .container {
        max-width: 1400px;  /* 2K/2.5K显示器 */
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .container {
        max-width: 1200px;  /* 标准PC */
    }
}

@media (max-width: 1023px) {
    .container {
        max-width: 100%;
    }
}

/* Logo和标题 */
.logo {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
}

.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* 按钮样式 */
.btn-primary {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 1.3rem;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f8f9ff;
    transform: translateY(-2px);
}

/* 信息说明 */
.info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.info ul {
    list-style: none;
}

.info li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.info li:last-child {
    border-bottom: none;
}

/* 会议室页面 */
.meeting-room {
    max-width: 95vw;  /* 使用视口宽度的95% */
    width: 100%;
    margin: 0 auto;
}

/* 响应式宽度 - 适配不同屏幕 */
@media (min-width: 2560px) {
    .meeting-room {
        max-width: 2400px;  /* 2K显示器 */
    }
}

@media (min-width: 1920px) and (max-width: 2559px) {
    .meeting-room {
        max-width: 1800px;  /* 1080p显示器 */
    }
}

@media (min-width: 1440px) and (max-width: 1919px) {
    .meeting-room {
        max-width: 1400px;  /* 2K/2.5K显示器 */
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .meeting-room {
        max-width: 1200px;  /* 标准PC */
    }
}

@media (max-width: 1023px) {
    .meeting-room {
        max-width: 100%;
    }
}

.meeting-header {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.topic-display {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.topic-label {
    font-weight: 600;
    color: #667eea;
}

.topic-text {
    color: #333;
    font-size: 1.05rem;
}

/* 状态栏 */
.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
}

.status-indicator.status-active {
    background: #6bcb77;
    animation: pulse 2s infinite;
}

.status-indicator.status-complete {
    background: #4d96ff;
}

.status-indicator.status-error {
    background: #ff6b6b;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 当前发言者提示 */
.current-speaker {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.speaker-avatar {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9ff;
    border-radius: 50%;
}

.speaker-info {
    flex: 1;
}

.speaker-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.speaker-status {
    color: #888;
    margin-top: 5px;
}

.speaker-dots {
    display: flex;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 发言容器 */
.speeches-container {
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 超大屏幕 - 4列布局（2K显示器等） */
@media (min-width: 2048px) {
    .speeches-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
        padding: 20px 0;
    }

    /* 前7个角色正常排列，蓝色思考帽不占满整行 */
    .speech-card:last-child {
        grid-column: auto;
    }
}

/* PC端布局 - 3列2行（适合7个角色） */
@media (min-width: 1024px) and (max-width: 2047px) {
    .speeches-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 20px 0;
    }

    /* 最后一个卡片（蓝色思考帽）占满整行 */
    .speech-card:last-child {
        grid-column: 1 / -1;
    }
}

/* 平板/小笔记本 - 2列布局 */
@media (min-width: 768px) and (max-width: 1023px) {
    .speeches-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* 奇数个卡片时最后一个占满整行 */
    .speech-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* 发言卡片 */
.speech-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 5px solid #ccc;
    transition: all 0.3s ease;
    /* 网格布局时保持高度一致 */
    display: flex;
    flex-direction: column;
}

/* 移动端/窄屏保留margin-bottom */
@media (max-width: 1199px) {
    .speech-card {
        margin-bottom: 20px;
    }
}

.speech-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.speech-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.speech-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.speech-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.speech-personality {
    margin-left: auto;
    padding: 5px 12px;
    background: #f8f9ff;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #667eea;
    white-space: nowrap;
}

.speech-content {
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
    flex: 1;
    /* 网格布局时限制内容高度，超出滚动 */
    max-height: 300px;
    overflow-y: auto;
}

/* 移动端/窄屏不限制高度 */
@media (max-width: 1199px) {
    .speech-content {
        max-height: none;
        overflow-y: visible;
    }
}

/* 美化滚动条 */
.speech-content::-webkit-scrollbar {
    width: 6px;
}

.speech-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.speech-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.speech-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.speech-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.speech-time {
    color: #999;
    font-size: 0.9rem;
}

/* 会议室底部 */
.meeting-footer {
    text-align: center;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .logo {
        font-size: 2rem;
    }

    .header h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 20px;
    }

    .speech-card {
        padding: 20px;
    }

    .current-speaker {
        flex-direction: column;
        text-align: center;
    }

    .speaker-personality {
        margin-left: 0;
        margin-top: 10px;
    }
}
