/**
 * 24点计算器工具样式 - 现代化UI
 */

.pwt-24-game-calculator {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 选项卡样式 - 现代化设计 */
.pwt-24-game-calculator .pwt-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
    position: relative;
    overflow-x: auto; /* 允许在小屏幕上滚动 */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.pwt-24-game-calculator .pwt-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.pwt-24-game-calculator .pwt-tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    color: #555;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    outline: none;
}

.pwt-24-game-calculator .pwt-tab-button:hover {
    color: #0073aa;
    background-color: rgba(0, 115, 170, 0.05);
}

.pwt-24-game-calculator .pwt-tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #0073aa;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.pwt-24-game-calculator .pwt-tab-button.active {
    color: #0073aa;
}

.pwt-24-game-calculator .pwt-tab-button.active::after {
    transform: scaleX(1);
}

.pwt-24-game-calculator .pwt-tab-content {
    display: none;
    padding: 20px 0;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwt-24-game-calculator .pwt-tab-content.active {
    display: block;
}

/* 数字输入组 - 现代化设计 */
.pwt-24-game-calculator .pwt-number-inputs {
    display: flex;
    gap: 12px;
    margin: 15px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pwt-24-game-calculator .pwt-number-inputs input {
    width: 70px;
    height: 70px;
    text-align: center;
    font-size: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pwt-24-game-calculator .pwt-number-inputs input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

.pwt-24-game-calculator .pwt-number-inputs input.error {
    border: 2px solid #dc3232;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* 表单组样式 */
.pwt-24-game-calculator .pwt-form-group {
    margin-bottom: 20px;
}

.pwt-24-game-calculator .pwt-input-description {
    margin-bottom: 12px;
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.pwt-24-game-calculator .pwt-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.pwt-24-game-calculator .pwt-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.pwt-24-game-calculator .pwt-select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: none;
}

/* 按钮样式 - 现代化设计 */
.pwt-24-game-calculator .pwt-button-group {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pwt-24-game-calculator .pwt-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 按钮点击效果 */
.pwt-24-game-calculator .pwt-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 按钮波纹效果 */
.pwt-24-game-calculator .pwt-button::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.pwt-24-game-calculator .pwt-button:active::after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* 按钮计算中状态 */
.pwt-24-game-calculator .pwt-button.calculating,
.pwt-24-game-calculator .pwt-button.generating {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.pwt-24-game-calculator .pwt-button.calculating::before,
.pwt-24-game-calculator .pwt-button.generating::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 12px;
    width: 15px;
    height: 15px;
    margin-top: -7px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: white;
    border-radius: 50%;
    animation: pwt-spin 0.8s linear infinite;
}

.pwt-24-game-calculator .pwt-primary-button {
    background-color: #0073aa;
    color: white;
}

.pwt-24-game-calculator .pwt-primary-button:hover {
    background-color: #005d8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pwt-24-game-calculator .pwt-button-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.pwt-24-game-calculator .pwt-button-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 禁用按钮样式 */
.pwt-24-game-calculator .pwt-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 结果区域 - 现代化设计 */
.pwt-24-game-calculator .pwt-result-container {
    margin-top: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 5px solid #0073aa;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pwt-24-game-calculator .pwt-result-container:empty {
    display: none;
}

.pwt-24-game-calculator .pwt-result-header {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.pwt-24-game-calculator .pwt-solution-list {
    margin: 0;
    padding: 0;
    list-style-position: inside;
}

.pwt-24-game-calculator .pwt-solution-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.pwt-24-game-calculator .pwt-solution-item:hover {
    background-color: rgba(0, 115, 170, 0.05);
}

.pwt-24-game-calculator .pwt-solution-item:last-child {
    border-bottom: none;
}

/* 题目生成器样式 - 现代化设计 */
.pwt-24-game-calculator .pwt-problem-card {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInCard 0.5s ease forwards;
}

@keyframes fadeInCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwt-24-game-calculator .pwt-problem-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.pwt-24-game-calculator .pwt-problem-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pwt-24-game-calculator .pwt-problem-numbers {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: bold;
    justify-content: center;
    flex-wrap: wrap;
}

.pwt-24-game-calculator .pwt-problem-number {
    display: inline-flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    background-color: #f1f1f1;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.pwt-24-game-calculator .pwt-problem-card:hover .pwt-problem-number {
    background-color: #e6f2f8;
    color: #0073aa;
}

.pwt-24-game-calculator .pwt-solution-toggle {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pwt-24-game-calculator .pwt-solution-toggle:hover {
    background-color: #005d8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pwt-24-game-calculator .pwt-problem-solution {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    border-left: 3px solid #0073aa;
    animation: fadeIn 0.5s ease;
}

/* 加载动画 - 现代化设计 */
.pwt-24-game-calculator .pwt-loading-container {
    text-align: center;
    padding: 30px 0;
}

.pwt-24-game-calculator .pwt-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 115, 170, 0.2);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: pwt-spin 1s linear infinite;
}

.pwt-24-game-calculator .pwt-loading-container p {
    margin-top: 15px;
    color: #666;
    font-weight: 500;
}

@keyframes pwt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 错误消息 - 现代化设计 */
.pwt-24-game-calculator .pwt-error-message {
    padding: 15px 20px;
    margin: 15px 0;
    background-color: #fff5f5;
    color: #d32f2f;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.1);
    font-weight: 500;
}

/* 响应式设计 - 增强的小屏幕支持 */
@media screen and (max-width: 768px) {
    .pwt-24-game-calculator {
        padding: 15px;
    }
    
    .pwt-24-game-calculator .pwt-number-inputs input {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .pwt-24-game-calculator .pwt-number-inputs {
        justify-content: space-between;
    }
    
    .pwt-24-game-calculator .pwt-number-inputs input {
        width: calc(25% - 10px);
        height: 50px;
        font-size: 18px;
    }
    
    .pwt-24-game-calculator .pwt-button-group {
        flex-direction: column;
    }
    
    .pwt-24-game-calculator .pwt-button {
        width: 100%;
    }
    
    .pwt-24-game-calculator .pwt-problem-numbers {
        gap: 8px;
    }
    
    .pwt-24-game-calculator .pwt-problem-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .pwt-24-game-calculator .pwt-tab-button {
        padding: 10px 15px;
        
    }
} 