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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #333;
    min-height: 100vh;
    height: 100vh; /* 确保填满整个视口高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden; /* 防止水平滚动条 */
}

.container {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh; /* 确保容器至少填满视口高度 */
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch; /* 确保子元素拉伸填满容器 */
    box-sizing: border-box;
}

/* 主菜单样式 */
.main-menu {
    text-align: center;
    width: 100%;
    max-width: 600px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-menu:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.main-menu h1 {
    font-size: 3em;
    margin-bottom: 40px;
    color: #ff4d4d;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titlePulse 2s infinite;
}

@keyframes titlePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.menu-button {
    padding: 20px 40px;
    font-size: 1.4em;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.menu-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.menu-button:hover:before {
    left: 100%;
}

.menu-button.truth {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.menu-button.dare {
    background: linear-gradient(45deg, #ff4d4d, #ff3333);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

.menu-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.menu-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.truth {
    background-color: #4CAF50;
    color: white;
}

.dare {
    background-color: #ff4d4d;
    color: white;
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 15px 30px;
    font-size: 18px;
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 2;
}

.spin-button:hover {
    background-color: #ff3333;
    transform: translate(-50%, -50%) scale(1.05);
}

.spin-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 建议表单样式 */
.suggestion-form {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 400px;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.suggestion-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    background-color: #fff;
}

.submit-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.submit-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.submit-button:hover:before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.submit-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal h2 {
    color: #ff4d4d;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.modal p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #333;
}

.close-button {
    padding: 10px 25px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.close-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

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

    .suggestion-form {
        width: 100%;
        max-width: 400px;
    }

    .menu-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .main-menu h1 {
        font-size: 2em;
    }
}
/* 必填项标记 */
.required::after {
    content: '*';
    color: #ff4d4d;
    margin-left: 4px;
}

/* 字数限制提示 */
.char-count {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 4px;
}

/* 表单验证提示 */
.form-group input:invalid,
.form-group textarea:invalid {
    border-color: #ff4d4d;
}

.validation-message {
    font-size: 12px;
    color: #ff4d4d;
    margin-top: 4px;
    display: none;
}

.form-group input:invalid + .validation-message,
.form-group textarea:invalid + .validation-message {
    display: block;
}

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

    .suggestion-form {
        width: 100%;
        max-width: 400px;
    }

    .menu-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .main-menu h1 {
        font-size: 2em;
    }
}