/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', cursive, sans-serif;
}

body {
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* 像素风格效果 */
.pixel-effect {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* 胶囊容器 */
.capsule-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* 胶囊样式 */
.capsule {
    width: 300px;
    height: 120px;
    border-radius: 60px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.capsule:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.capsule:active {
    transform: scale(0.95);
}

/* 胶囊两半部分 */
.capsule-half {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
}

.capsule-left {
    left: 0;
    background-color: #ff4d4d;
    border-radius: 60px 0 0 60px;
    border: 4px solid #000;
    border-right: 2px solid #000;
}

.capsule-right {
    right: 0;
    background-color: #ffffff;
    border-radius: 0 60px 60px 0;
    border: 4px solid #000;
    border-left: 2px solid #000;
}

/* 像素风格边框 */
.pixel-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 60px;
    pointer-events: none;
}

/* 提示文字 */
.capsule-text {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
    z-index: 10;
    padding: 0 20px;
}

/* 点击提示 */
.click-hint {
    margin-top: 30px;
    font-size: 12px;
    color: #666;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .capsule {
        width: 240px;
        height: 100px;
    }
    
    .capsule-text {
        font-size: 14px;
    }
}

/* 表单页面样式 */
.form-container {
    display: none;
    width: 90%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 4px solid #000;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 3px solid #000;
    border-radius: 8px;
    font-size: 14px;
    background-color: #f8f8f8;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    border: 3px solid #000;
    transition: background-color 0.3s;
}

.form-button:hover {
    background-color: #ff3333;
}

/* 动画效果 */
@keyframes openCapsule {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes showForm {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.open-animation {
    animation: openCapsule 0.8s forwards;
}

.show-form {
    display: block;
    animation: showForm 0.5s forwards;
}
