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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #4CAF50;
    color: white;
    border-radius: 8px;
}

header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

main {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

section {
    margin-bottom: 30px;
}

section h2 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.input-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    font-size: 14px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

button:active {
    background-color: #3e8e41;
}

#ar-container {
    margin-top: 15px;
}

#ar-video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.advice-result {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #4CAF50;
}

#advice-content {
    min-height: 100px;
    padding: 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 提示文本样式 */
.hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* 牌型选择容器 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

/* 单张牌样式 */
.card {
    width: 60px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: bold;
    position: relative;
}

/* 红桃和方块 */
.card.red {
    color: #e74c3c;
    border-color: #e74c3c;
    background-color: #fff5f5;
}

/* 黑桃和梅花 */
.card.black {
    color: #333;
    border-color: #333;
    background-color: #f9f9f9;
}

/* 王 */
.card.joker {
    color: #f39c12;
    border-color: #f39c12;
    background-color: #fff9e6;
}

/* 选中状态 */
.card.selected {
    background-color: #d4edda;
    border-color: #28a745;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
}

/* 牌的花色符号 */
.card .suit {
    font-size: 18px;
    margin-bottom: 2px;
}

/* 牌的点数 */
.card .rank {
    font-size: 16px;
}

/* 牌型统计信息 */
.card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 20px;
    }

    main {
        padding: 15px;
    }

    section h2 {
        font-size: 16px;
    }

    .input-group textarea {
        font-size: 13px;
        padding: 8px;
    }

    button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
    }

    .card {
        width: 50px;
        height: 70px;
        font-size: 12px;
    }

    .card .suit {
        font-size: 16px;
    }

    .card .rank {
        font-size: 14px;
    }
}