:root {
    --primary-color: #ffc116;
    --dark-bg: #212121;
    --text-color: #333;
    --border-color: #e0e0e0;
    --error-color: #dc3545;
    --success-color: #28a745;
    --hover-color: #F9A825;
    --light-bg: #f8f9fa;
}

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

html {
    overflow-x: hidden;
    margin-right: calc(-1 * (100vw - 100%));
}
/* 声明自定义字体 */
@font-face {
  font-family: 'ABCArizonaFlare'; 
  src: url('../fonts/fonnts.com-ABCArizonaFlareVariable-Trial.ttf') format('truetype'); /* 字体文件路径 */
  font-weight: normal; /* 字体粗细（变量字体可省略，或根据字体特性设置） */
  font-style: normal; /* 字体样式 */
  font-display: swap; /* 优化字体加载体验，避免闪烁 */
}


body {
    font-family: 'ABCArizonaFlare', sans-serif; /* 应用到元素 */
    line-height: 1.6;
    background-color: var(--dark-bg);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

header {
    background-color: var(--dark-bg);
    padding: 1rem 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo img {
    height: 20px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
}

.arrow-down {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--primary-color);
    margin-left: 0.5rem;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    min-width: 150px;
}

/* 添加新的显示类 */
.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.lang-option:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.logout-btn {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.welcome-text {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1.2rem;
}

main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}
.welcome-container {
    color: #fff;
    margin: 2rem;
    font-size: 30px;
    text-align: center;
}
.product-registration-container {
    background-size: cover;
    padding: 2rem;
    border-radius: 8px;
    color: white;
    margin-bottom: 2rem;
    background-image: url(../images/bg.jpg);
     background-size: cover;
    /* 背景图位置居中 */
    background-position: center;
    /* 背景图不重复 */
    background-repeat: no-repeat;
}

.product-registration-container h1 {
    color: #fff;
    margin-bottom: 1rem;
    font-family: 'ABCArizonaFlare', sans-serif; /* 应用到元素 */
}

.subtitle {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #fff;
}

.register-btn {
    background-color:#fff;
    color: #333;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
}

.register-btn:hover {
    background-color: var(--hover-color);
}

.note {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-top: 30px;
}

.page-container {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.main-nav {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--light-bg);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.content-section {
    padding: 1rem 0;
    width: 100%;
    box-sizing: border-box;
    /* overflow: hidden; */
}

.form-section {
    margin-bottom: 3rem;
    padding: 0 2rem;
    border-radius: 8px;
}

.form-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(5, 122, 139, 0.1);
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--primary-color);
}

.submit-info {
    padding: 1.5rem;
    background-color: rgba(5, 122, 139, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.submit-info p {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
}

.submit-options {
    margin-top: 2rem;
}

.submit-description h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.submit-choice {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.choice-item {
    padding: 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn-login {
    background-color: var(--primary-color);
}

.submit-btn-no-login {
    background-color: #666;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-color: var(--hover-color);
}

.submit-btn-login:hover {
    background-color: var(--hover-color);
}

.submit-btn-no-login:hover {
    background-color: #555;
}

/* 响应式布局 */
@media (max-width: 992px) {
    /*main {*/
    /*    padding: 1rem;*/
    /*}*/
    .product-registration-container {
        background-image: url(../images/m-bg.png);
        height:300px;
    }
}

@media (max-width: 768px) {
    .video-title {
        flex-direction: column;
        align-items: flex-start;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .nav-link.active::after {
        display: none;
    }

    .form-section {
        padding: 1.5rem;
    }

    .submit-choice {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .choice-item {
        padding: 1.5rem;
    }

    .submit-btn {
        padding: 0.8rem 1.5rem;
    }
    .login-section, .register-section {
        padding: 40px 20px !important;
    }
      .product-registration-container {
        height:350px;
    }
}

@media (max-width: 480px) {
    .product-registration-container {
        height:400px;
    }
    .help-box {
    padding: 0;
    }
    main {
        padding: 1rem;
    }
    .header-right {
        gap: 0.5rem;
    }

    .product-registration-container {
        padding: 1rem;
    }

    .page-container {
        padding: 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .choice-item {
        padding: 1rem;
    }

    .submit-btn {
        padding: 0.8rem 1.5rem;
    }
}

/* 表单验证样式 */
.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
    display: block;
    font-weight: 500;
}

/* .form-group input:invalid,
.form-group select:invalid {
    border-color: var(--error-color);
    background-color: rgba(220, 53, 69, 0.05);
} */

.form-group input:valid,
.form-group select:valid {
    border-color: var(--primary-color);
    background-color: rgba(40, 167, 69, 0.05);
}

.form-group input:focus:invalid {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.form-group input:focus:valid {
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

/* 添加错误图标 */
.form-group input:invalid + .error-message:not(:empty)::before,
.form-group select:invalid + .error-message:not(:empty)::before {
    content: '⚠️';
    margin-right: 0.5rem;
}

/* 错误信息动画效果 */
.error-message:not(:empty) {
    animation: slideIn 0.3s ease-in-out;
    padding: 0.5rem;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 帮助区域样式 */
.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
}

.help-box {
    padding: 1rem;
    /*border: 1px solid var(--border-color);*/
    border-radius: 8px;
    transition: all 0.3s ease;
}

.help-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.help-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.help-box p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.help-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.help-link:hover {
    color: var(--hover-color);
    transform: translateX(5px);
}

.help-box .contact-info p {
    margin-bottom: 1rem;
}

.help-box .contact-info p:last-child {
    margin-bottom: 0;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .help-grid {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .help-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    /*.help-box {*/
    /*    padding: 1.5rem;*/
    /*}*/
}

/* 登录和注册页面特定样式 */
.login-section,
.register-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 100px;
    background-color: white;
    border-radius: 8px;
}


.login-section .form-grid,
.register-section .form-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    grid-template-columns: unset; 
}

.login-section h1,
.register-section h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 500;
}
.login-form-section {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
}
.login-form,
.register-form {
    width: 100%;
}

.form-group {
    width: 100%;
}
.login-links {
    margin-top: 20px;
}
.login-links a {
    color: var(--primary-color);
}
.login-links a:nth-child(2) {
    margin-left: 10px;
    color: var(--text-color);
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group label .required {
    color: var(--error-color);
    margin-left: 0.2rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    /*background-color: #f8f9fa;*/
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(5, 122, 139, 0.1);
}

.form-group input:hover {
    border-color: var(--primary-color);
}

/* 密码输入框特殊样式 */
.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    width: 100%;
}

.forgot-password {
    position: absolute;
    right: 0;
    top: -24px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 登录按钮样式 */
.login-button,
.register-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 2rem;
}

.login-button:hover,
.register-button:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 注册链接样式 */
.register-link {
    text-align: center;
    font-size: 0.95rem;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.5rem;
}

.register-link a:hover {
    text-decoration: underline;
}

/* 错误提示样式 */
.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: block;
}
/* 个人中心资料 */
.user-center-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
}

.user-center-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.user-center-section hr {
    margin: 1rem 0;
    border: none;
    height: 1px;
    background-color: #e0e0e0;
}

.personal-info, .address-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem; 
}
.personal-info h3 {
    margin-bottom: 30px;
}
.address-info h3 {
    margin-bottom: 30px;
}
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.info-item label {
    font-weight: bold;
    width: 30%;
}

.info-item span {
    width: 70%;
}

.edit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background-color: var(--hover-color);
}

@media (max-width: 768px) {
    .user-center-section {
        padding: 1rem;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-item label {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .info-item span {
        width: 100%;
    }
}

/* 表格样式 */
.warranty-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.table-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
}

.header-cell {
    font-weight: bold;
    text-align: center;
}

.table-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.table-row:hover {
    background-color: #f8f9fa;
}

.table-cell {
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 操作按钮样式 */
.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 产品名称单元格特殊处理 */
.table-cell:nth-child(3) {
    font-weight: 500;
}



/* 响应式布局 */
@media (max-width: 1024px) {
    .table-header,
    .table-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .header-cell,
    .table-cell {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    /* 在小屏幕上隐藏某些列 */
    .header-cell:nth-child(4),
    .header-cell:nth-child(5),
    .table-cell:nth-child(4),
    .table-cell:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .table-header,
    .table-row {
        grid-template-columns: 1fr 1fr;
    }

    .header-cell,
    .table-cell {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .register-product-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* 添加取消按钮样式 */
.cancel-btn {
    background-color: #f0f0f0;
    color: var(--text-color);
    border: 1px solid #ddd;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-left: 10px;
    min-width: 100px;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.button-group .submit-btn,
.button-group .cancel-btn {
    width: auto;
    min-width: 120px;
    margin: 0;
}

/* 添加编辑表单按钮组样式 */
#profileEditForm .form-group:has(.submit-btn) {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

#profileEditForm .submit-btn {
    width: auto;
    min-width: 120px;
}

/* 自定义logo样式 */
.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
} 
.trp-language-switcher > div {
    border: none !important;
    border-radius: 4px !important;
    padding: 0 !important;
}
.trp-language-switcher {width: auto;height: auto;}
.trp-language-switcher > div > a {
    padding: 7px 10px;
}





