/* 装修价格计算器样式 - 现代美学风格 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3dc;
    --light-color: #f8f9fa;
    --dark-color: #2d3142;
    --text-color: #4a4a4a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --gradient-bg: linear-gradient(135deg, #c2e9fb 0%, #a1c4fd 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--gradient-bg);
    min-height: 100vh;
    padding: 0px 0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/tool/gujia/images/beijing.jpg') no-repeat center center fixed;
    background-size: cover;
    opacity: 0.15;
    z-index: -1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding:10px 0;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

header h1:hover {
    transform: scale(1.02);
}

header p {
    color: var(--secondary-color);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    transition: var(--transition);
}

header p:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.calculator-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 30px;
    border: var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0px;
    animation: fadeIn 0.8s ease-out;
}

.calculator-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 1.05rem;
}

input[type="number"] {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
    outline: none;
    background: white;
}

.radio-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    width: auto;
    flex: 1;
}

.radio-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: var(--transition);
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.radio-label:hover::before {
    background: var(--accent-color);
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    margin-right: 5px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
    background: rgba(74, 111, 165, 0.05);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: pulse 0.3s ease-out;
}

.radio-label input[type="radio"]:checked ~ .type-name {
    color: var(--primary-color);
    font-weight: bold;
}

.radio-label input[type="radio"]:checked ~ .radio-content {
    opacity: 1;
}

.radio-label input[type="radio"]:checked {
    background: rgba(74, 111, 165, 0.05);
    border-left: 4px solid var(--primary-color);
}

.radio-content {
    display: flex;
    flex-direction: column;
    opacity: 0.9;
    transition: var(--transition);
}

.type-name {
    font-weight: 600;
    margin-right:0px;
    font-size: 1.05rem;
}

.type-desc {
    color: #666;
    font-size: 0.9rem;
    margin-top: 31px;
}

.calculate-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 25px;
    font-size: 17px;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(22, 96, 136, 0.3);
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(22, 96, 136, 0.4);
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(22, 96, 136, 0.3);
}

.consult-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    margin-top: 15px;
    width: 100%;
}

.consult-btn:hover {
    background-color: #3dacd8;
    transform: translateY(-2px);
}

.result {
    margin-top: 6px;
    padding-top: 20px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s ease-out;
}

.result h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.result h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
}

.result .fa-coins {
    color: #4fc3dc;
}

.result-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.result-content:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.result-content p {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-content p:last-child {
    margin-bottom: 0;
}

.result-content .price {
    color: #e63946;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.05);
}

.note {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin: 15px auto 0;
    font-style: italic;
    text-align: center;
    padding: 10px;
    background: rgba(74, 111, 165, 0.1);
    border-radius: var(--border-radius);
    max-width: 100%;
}

.price-explanation {
    margin-top: 30px;
    animation: fadeIn 1s ease-out;
}

.price-explanation h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.price-explanation h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    border-radius: 3px;
}

.explanation-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.explanation-item {
    margin-bottom: 10px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: var(--glass-border);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.explanation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
}

.explanation-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.explanation-item:hover::before {
    opacity: 1;
}

.explanation-item h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.1rem;
}

.explanation-item p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.7;
}

footer {
    text-align: center;
    padding: 20px 0 20px;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-top: 20px;
    position: relative;
}

/* 添加 footer 链接样式 */
footer a {
    text-decoration: none;
    color: inherit;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 模态框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.4s;
    box-shadow: var(--shadow);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

#consultForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

#consultForm input,
#consultForm select,
#consultForm textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

#consultForm textarea {
    min-height: 100px;
    resize: vertical;
}

#consultForm button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    margin-top: 15px;
    width: 100%;
}

.consult-btn:hover {
    background-color: #3dacd8;
    transform: translateY(-2px);
}

#consultForm button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 20px 0;
    }
    
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .calculator-container {
        padding: 25px;
    }
    
    .radio-label {
        padding: 12px 15px;
    }
    
    .explanation-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .calculator-container {
        padding: 20px;
    }
    
    .result-content p {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-content .price {
        margin-top: 5px;
    }
}

.floating-consult-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(79, 195, 220, 0.35);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
 

.floating-consult-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: rgba(79, 195, 220, 0.9);
}

.floating-consult-btn i {
    font-size: 24px;
}


::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
}
::-webkit-scrollbar-track {
  background-color: var(--light-color);
}