/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    color: white;
    overflow-x: hidden;
}

.container {
    width: 90%;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    background: transparent;
    z-index: 100;
}

h1,
h2,
h3,
h4 {
    color: #000000;
}

/* 主题选择器 */
.theme-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-selector select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: rgba( 255, 255, 255, 0.2 );
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    backdrop-filter: blur( 5.5px );
    -webkit-backdrop-filter: blur( 5.5px );
    border-radius: 10px;
    border: 1px solid rgba( 255, 255, 255, 0.18 );
}

/* 简历构建器布局 */
.resume-builder {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 30px;
    height: calc(100vh - 150px);
    overflow: hidden;
}

.editor-panel,
.preview-panel {
    background: rgba( 255, 255, 255, 0.2 );
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    backdrop-filter: blur( 5.5px );
    -webkit-backdrop-filter: blur( 5.5px );
    border-radius: 10px;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

/* 表单样式 */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-group {
    margin-bottom: 15px;
    margin-right: 30px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 229px;
    padding: 10px;
    border-radius: 4px;
    font-family: inherit;
    color: #000000;
    background: rgba( 255, 255, 255, 0.25 );
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    backdrop-filter: blur( 6.5px );
    -webkit-backdrop-filter: blur( 6.5px );
    border: 1px solid rgba( 255, 255, 255, 0.18 );
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* 按钮样式 */
button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.add-btn {
    background: transparent;
    color: rgb(0, 198, 198);
    margin-top: 10px;
    font-size: 17px;
}

.add-btn:hover{
    transform: scale(1.1);
}

.remove-btn {
    background: transparent;
    color: rgb(255, 0, 0);
    margin-top: 10px;
    font-size: 17px;

}

.remove-btn:hover{
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#preview-btn,
#save-btn,
#reset-btn,
#export-btn,
#export-pdf-btn {
    flex: 1;
}

#preview-btn {
    background-color: #2ecc71;
    color: white;
}

#preview-btn:hover {
    background-color: #27ae60;
}

#save-btn {
    background-color: #3498db;
    color: white;
}

#save-btn:hover {
    background-color: #2980b9;
}

#reset-btn {
    background-color: #95a5a6;
    color: white;
}

#reset-btn:hover {
    background-color: #7f8c8d;
}


/* 简历预览样式 */
.resume-template {
    padding: 30px;
    background-color: white;
    min-height: 800px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.resume-header {
    display: flex;
    margin-bottom: 30px;
    
}

.resume-header h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.resume-header p {
    color: #000000;
}

.resume-section {
    margin-bottom: 25px;
}

.resume-section h3 {
    border-bottom: 1px solid #000000;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 20px;
}

.work-item,
.education-item {
    margin-bottom: 20px;
}

.work-item h4,
.education-item h4 {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
}

.work-item .position,
.education-item .degree {
    font-weight: 500;
}

.work-item .date,
.education-item .date {
    color: #666;
    font-size: 16px;
}

.work-item .company,
.education-item .school {
    color: #000000;
    font-weight: 500;
}

.work-item .description,
.education-item .field {
    margin-top: 10px;
    color: #555;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-item {
    background-color: #3498db;
    color: rgb(253, 253, 253);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

/* 图片预览区域 */
.image-preview-container {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

/* 主题样式 */
body.dark-theme {
    background-color: #222;
    color: #eee;
}

.dark-theme .editor-panel,
.dark-theme .preview-panel,
.dark-theme .resume-template {
    background-color: #333;
    color: #eee;
}

.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme .resume-header h2 {
    color: #ffffff;
}

.dark-theme h4{
    color: #e3e2e2;
}

.dark-theme input,
.dark-theme select,
.dark-theme textarea {
    background-color: #444;
    color: #eee;
    border-color: #555;
}

.dark-theme .resume-section h3 {
    border-color: #9b59b6;
}

.dark-theme .work-item .company,
.dark-theme .education-item .school {
    color: #9b59b6;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 0;
}

.newspan{
    font-size: 20px;
    position: relative;
    top: 10px;
}

.contact-info-ppp{
    display: flex;
}

.contact-info-ppp p{
    margin-right: 10px;
}

.avatar-upload {
    position: relative;
    display: inline-block;
}

#avatar {
    display: none;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    overflow: hidden;
    cursor: pointer;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview:empty::after {
    content: "点击上传头像";
    font-size: 12px;
    color: #999;
}

.avatar-preview:hover::after {
    color: #333;
}

.resume-avatar {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    position:absolute;
    top: 30px;
    left: 600px;
    
}

.resume-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 8% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 600px;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.ai-polish-btn{
    color: #fff;
    background-color: #27ae60;
}

.ai-polish-btn:hover{
    background-color: #2ecc71;
}

#original-text{
    min-height: 50px;
    background: rgba( 255, 255, 255, 0.25 );
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    backdrop-filter: blur( 4px );
    -webkit-backdrop-filter: blur( 4px );
    border-radius: 10px;
    border: 1px solid rgba(255, 19, 19, 0.18);
    padding: 5px 15px;
}

#polished-text{
    min-height: 50px;
    background: rgba( 255, 255, 255, 0.25 );
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    backdrop-filter: blur( 4px );
    -webkit-backdrop-filter: blur( 4px );
    border-radius: 10px;
    border: 1px solid rgba(255, 19, 19, 0.18);
    padding: 5px 15px;

}



.button_AI {
    position: relative;
    overflow: hidden;
    width: 100px;
    height: 50px;
    padding: 0 2rem;
    border-radius: 1.5rem;
    background: #3d3a4e;
    background-size: 400%;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-top: 40px;
    margin-right: 60px;
    
  }
  
  .button_AI:hover::before {
    transform: scaleX(1);
  }
  
  .button-content_AI {
    position: relative;
    z-index: 1;
  }
  
  .button_AI::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: 0 50%;
    width: 100%;
    height: inherit;
    border-radius: inherit;
    background: linear-gradient(
      82.3deg,
      rgba(150, 93, 233, 1) 10.8%,
      rgba(99, 88, 238, 1) 94.3%
    );
    transition: all 0.475s;
  }
  
  .boton-elegante {
    padding: 15px 30px;
    border: 2px solid #2c2c2c;
    background-color: #1a1a1a;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 1.5rem;
    transition: all 0.4s ease;
    outline: none;
    position: relative;
    overflow: hidden;
    font-weight: bold;
    margin-top: 40px;
    margin-left: 60px;
  }
  
  .boton-elegante::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0) 70%
    );
    transform: scale(0);
    transition: transform 0.5s ease;
  }
  
  .boton-elegante:hover::after {
    transform: scale(4);
  }
  
  .boton-elegante:hover {
    border-color: #666666;
    background: #292929;
  }

  .model_loader{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: #000000a2;
  }
  
  .loader {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: not-allowed;
    scale: 0.7;
    margin: 270px auto;
  }
  
  .central {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 10em;
    height: 10em;
    border-radius: 50%;
    box-shadow: 0.5em 1em 1em blueviolet,
      -0.5em 0.5em 1em blue,
      0.5em -0.5em 1em purple,
      -0.5em -0.5em 1em cyan;
  }
  
  .external-shadow {
    width: 10em;
    height: 10em;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0.5em 0.5em 3em blueviolet,
      -0.5em 0.5em 3em blue,
      0.5em -0.5em 3em purple,
      -0.5em -0.5em 3em cyan;
    z-index: 999;
    animation: rotate 1.7s linear infinite;
    background-color: #000000;
  }
  
  .intern {
    position: absolute;
    color: white;
    z-index: 9999;
  }
  
  .intern::before {
    content: "AI润色中...";
    animation: percent 1.7s ease-in-out infinite;
  }
  
  @keyframes rotate {
    0% {
      transform: rotate(0deg);
    }
  
    50% {
      transform: rotate(180deg);
    }
  
    100% {
      transform: rotate(360deg);
    }
  }