/* =====================================
   Resource Download & Account Module CSS
   为下载资源和账号资料模块提供样式
   ===================================== */

/* 下载资源列表页 */
.download-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e4e4e4;
}

.download-header h1 {
  font-size: 22px;
  color: #333;
  margin: 0 0 10px 0;
  font-weight: normal;
}

.download-desc {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.6;
}

.download-filter {
  padding: 15px 20px;
  border-bottom: 1px solid #e4e4e4;
  background-color: #fafafa;
}

.filter-item {
  overflow: hidden;
}

.filter-label {
  float: left;
  font-weight: bold;
  margin-right: 15px;
  color: #555;
  line-height: 30px;
}

.filter-item a {
  display: inline-block;
  padding: 5px 15px;
  margin-right: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #666;
  background-color: #fff;
  transition: all 0.3s;
  margin-bottom: 5px;
}

.filter-item a:hover,
.filter-item a.cur {
  border-color: #00a0a0;
  color: #fff;
  background-color: #00a0a0;
}

/* 下载资源列表 */
.downloadList {
  padding: 20px;
  overflow: hidden;
}

.downloadItem {
  float: left;
  width: 49%;
  padding-right: 2%;
  padding-bottom: 2%;
  margin-bottom: 15px;
  border: 1px solid #e4e4e4;
  border-radius: 5px;
  padding: 15px;
  transition: all 0.3s;
  overflow: hidden;
}

.downloadItem:hover {
  box-shadow: 0px 0px 15px #ddd;
  border-color: #00a0a0;
}

.downloadItem .pic {
  float: left;
  width: 80px;
  height: 80px;
  margin-right: 15px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e4e4e4;
  border-radius: 3px;
}

.downloadItem .pic figure {
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
}

.downloadItem .pic img {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lock-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 18px;
  background: rgba(255, 0, 0, 0.8);
  padding: 2px 6px;
  border-radius: 3px;
}

.downloadItem .info {
  margin-left: 110px;
  overflow: hidden;
}

.downloadItem h2 {
  font-size: 16px;
  margin: 0 0 8px;
  font-weight: normal;
}

.downloadItem h2 a {
  color: #333;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.downloadItem h2 a:hover {
  color: #00a0a0;
}

.downloadItem .excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  height: 3.2em;
  overflow: hidden;
  margin: 0 0 8px;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0;
  font-size: 12px;
}

.meta-item {
  color: #888;
  white-space: nowrap;
}

.meta-item .icon {
  margin-right: 3px;
}

.download-actions {
  margin-top: 10px;
}

.btn-view {
  display: inline-block;
  padding: 6px 15px;
  background-color: #00a0a0;
  color: #fff;
  border-radius: 3px;
  font-size: 13px;
  transition: all 0.3s;
}

.btn-view:hover {
  opacity: 0.9;
  text-decoration: none;
}

/* 下载资源详情页 */
.resource {
  padding: 20px;
}

.res-header {
  border-bottom: 1px solid #e4e4e4;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.res-header .pic {
  float: left;
  width: 150px;
  margin-right: 20px;
}

.res-header .pic figure {
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid #e4e4e4;
}

.res-header .pic img {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.res-header .info {
  margin-left: 190px;
  overflow: hidden;
}

.res-header h1 {
  font-size: 24px;
  margin: 0 0 10px;
  font-weight: normal;
  color: #222;
}

.resource-desc {
  color: #666;
  font-size: 14px;
  margin: 0 0 15px;
  line-height: 1.6;
}

.res-meta {
  font-size: 14px;
  line-height: 1.8;
}

.res-meta p {
  margin: 0;
  display: table;
  width: 100%;
  table-layout: fixed;
}

.res-meta .left {
  display: table-cell;
  width: 100px;
  font-weight: bold;
  color: #555;
  padding: 5px 10px;
  border-left: 1px solid #e4e4e4;
  border-top: 1px solid #e4e4e4;
  text-align: right;
}

.res-meta .right {
  display: table-cell;
  padding: 5px 10px;
  border-right: 1px solid #e4e4e4;
  border-top: 1px solid #e4e4e4;
  color: #888;
}

/* 加密提示框 */
.lock-notice {
  text-align: center;
  padding: 40px 30px;
  background: linear-gradient(135deg, #f5f5f5 0%, #fff 100%);
  border: 1px solid #e4e4e4;
  border-radius: 5px;
  margin: 20px 0;
}

.lock-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.lock-notice h3 {
  font-size: 18px;
  color: #333;
  margin: 0 0 8px;
  font-weight: bold;
}

.lock-notice p {
  color: #666;
  font-size: 14px;
  margin: 0 0 15px;
}

.lock-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 15px 0;
  flex-wrap: wrap;
}

.lock-input {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 3px;
  width: 250px;
  font-size: 14px;
}

.lock-input:focus {
  outline: none;
  border-color: #00a0a0;
  box-shadow: 0 0 5px rgba(0, 160, 160, 0.3);
}

.lock-btn {
  padding: 10px 30px;
  background-color: #00a0a0;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s;
}

.lock-btn:hover {
  opacity: 0.9;
}

.lock-btn:active {
  transform: scale(0.98);
}

.lock-tip {
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* 下载链接区域 */
.download-section {
  margin: 20px 0;
}

.download-links {
  background-color: #fafafa;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.download-links h3 {
  font-size: 16px;
  color: #333;
  margin: 0 0 15px;
  font-weight: bold;
}

.link-item {
  padding: 12px 0;
  border-bottom: 1px solid #e4e4e4;
  display: table;
  width: 100%;
  table-layout: fixed;
}

.link-item:last-child {
  border-bottom: none;
}

.link-label {
  display: table-cell;
  width: 120px;
  font-weight: bold;
  color: #555;
  padding-right: 15px;
  vertical-align: middle;
  word-break: break-word;
}

.link-value {
  display: table-cell;
  padding-left: 15px;
  border-left: 1px solid #ddd;
  vertical-align: middle;
  word-break: break-all;
}

.link-value a {
  color: #00a0a0;
  word-break: break-all;
}

.code-value {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  color: #666;
  background: #f9f9f9;
  padding: 8px 12px;
  border-radius: 3px;
}

.copy-btn {
  padding: 5px 12px;
  background-color: #00a0a0;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 10px;
  transition: all 0.3s;
}

.copy-btn:hover {
  opacity: 0.9;
}

.download-notice {
  background-color: #fffacd;
  padding: 15px;
  border-left: 4px solid #ffd700;
  margin: 20px 0;
  border-radius: 3px;
}

.download-notice h3 {
  font-size: 14px;
  color: #333;
  margin: 0 0 8px;
  font-weight: bold;
}

.download-notice p {
  color: #666;
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}

/* 账号资料列表页 */
.account-header {
  padding: 15px 20px;
  border-bottom: 1px solid #e4e4e4;
}

.account-header h1 {
  font-size: 22px;
  color: #333;
  margin: 0 0 10px 0;
  font-weight: normal;
}

.account-desc {
  font-size: 14px;
  color: #666;
  margin: 0 0 12px;
  line-height: 1.6;
}

.account-notice {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px 15px;
  border-radius: 3px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.account-notice .icon {
  font-size: 18px;
  flex-shrink: 0;
}

.account-notice p {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* 账号资料列表 */
.accountList {
  padding: 20px;
  overflow: hidden;
}

.accountItem {
  float: left;
  width: 49%;
  padding-right: 2%;
  padding-bottom: 2%;
  margin-bottom: 15px;
  border: 1px solid #e4e4e4;
  border-radius: 5px;
  padding: 15px;
  transition: all 0.3s;
  overflow: hidden;
  position: relative;
}

.accountItem:hover {
  box-shadow: 0px 0px 15px #ddd;
  border-color: #ff6b6b;
}

.accountItem .pic {
  float: left;
  width: 80px;
  height: 80px;
  margin-right: 15px;
  position: relative;
  overflow: hidden;
  border: 1px solid #e4e4e4;
  border-radius: 3px;
}

.accountItem .pic figure {
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
}

.accountItem .pic img {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lock-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 18px;
  background: rgba(255, 107, 107, 0.9);
  padding: 2px 6px;
  border-radius: 3px;
}

.accountItem .info {
  margin-left: 110px;
  overflow: hidden;
}

.accountItem h2 {
  font-size: 16px;
  margin: 0 0 8px;
  font-weight: normal;
}

.accountItem h2 a {
  color: #333;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accountItem h2 a:hover {
  color: #ff6b6b;
}

.accountItem .excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  height: 3.2em;
  overflow: hidden;
  margin: 0 0 8px;
}

.account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0;
  font-size: 12px;
}

.account-actions {
  margin-top: 10px;
}

/* 账号资料详情页 */
.account {
  padding: 20px;
}

.acc-header {
  border-bottom: 1px solid #e4e4e4;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.acc-header .pic {
  float: left;
  width: 150px;
  margin-right: 20px;
}

.acc-header .pic figure {
  padding-bottom: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid #e4e4e4;
}

.acc-header .pic img {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acc-header .info {
  margin-left: 190px;
  overflow: hidden;
}

.acc-header h1 {
  font-size: 24px;
  margin: 0 0 10px;
  font-weight: normal;
  color: #222;
}

.account-section {
  margin: 20px 0;
}

.acc-meta {
  font-size: 14px;
  line-height: 1.8;
}

.acc-meta p {
  margin: 0;
  display: table;
  width: 100%;
  table-layout: fixed;
}

.acc-meta .left {
  display: table-cell;
  width: 100px;
  font-weight: bold;
  color: #555;
  padding: 5px 10px;
  border-left: 1px solid #e4e4e4;
  border-top: 1px solid #e4e4e4;
  text-align: right;
}

.acc-meta .right {
  display: table-cell;
  padding: 5px 10px;
  border-right: 1px solid #e4e4e4;
  border-top: 1px solid #e4e4e4;
  color: #888;
}

/* 凭证展示 */
.cred-section {
  background-color: #fafafa;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.cred-section h3 {
  font-size: 16px;
  color: #333;
  margin: 0 0 15px;
  font-weight: bold;
}

.cred-item {
  padding: 12px 0;
  border-bottom: 1px solid #e4e4e4;
  display: table;
  width: 100%;
  table-layout: fixed;
}

.cred-item:last-child {
  border-bottom: none;
}

.cred-label {
  display: table-cell;
  width: 120px;
  font-weight: bold;
  color: #555;
  padding-right: 15px;
  vertical-align: middle;
}

.cred-value {
  display: table-cell;
  padding-left: 15px;
  border-left: 1px solid #ddd;
  vertical-align: middle;
  word-break: break-all;
}

.masked-text {
  letter-spacing: 2px;
  color: #999;
  font-family: 'Courier New', monospace;
  background: #f9f9f9;
  padding: 3px 6px;
  border-radius: 2px;
}

.reveal-btn {
  padding: 4px 10px;
  background-color: #0066cc;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  margin-left: 10px;
  transition: all 0.3s;
}

.reveal-btn:hover {
  opacity: 0.9;
}

/* 账号安全提示 */
.account-notice {
  background-color: #ffe6e6;
  padding: 15px;
  border-left: 4px solid #ff6b6b;
  margin: 20px 0;
  border-radius: 3px;
}

.account-notice h3 {
  font-size: 14px;
  color: #c33;
  margin: 0 0 10px;
  font-weight: bold;
}

.safety-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.safety-list li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.safety-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #ff6b6b;
  font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .downloadItem,
  .accountItem {
    float: left;
    width: 100%;
    padding-right: 0;
    margin-bottom: 15px;
  }

  .downloadItem .pic,
  .accountItem .pic {
    float: left;
    width: 80px;
    height: 80px;
  }

  .downloadItem .info,
  .accountItem .info {
    margin-left: 100px;
  }

  .lock-form {
    flex-direction: column;
  }

  .lock-input {
    width: 100%;
  }

  .lock-btn {
    width: 100%;
  }

  .link-label,
  .cred-label {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
  }

  .link-value,
  .cred-value {
    display: block;
    border-left: none;
    border-top: 1px solid #ddd;
    padding-top: 5px;
  }
}

@media (max-width: 768px) {
  .downloadItem,
  .accountItem {
    float: none;
    width: 100%;
  }

  .downloadItem .pic,
  .accountItem .pic {
    float: left;
    width: 70px;
    height: 70px;
    margin-right: 10px;
  }

  .downloadItem .info,
  .accountItem .info {
    margin-left: 85px;
  }

  .res-header .pic,
  .acc-header .pic {
    float: none;
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }

  .res-header .info,
  .acc-header .info {
    margin-left: 0;
  }

  .filter-label {
    float: none;
    display: block;
    margin-bottom: 10px;
  }

  .lock-form {
    flex-direction: column;
  }

  .lock-input {
    width: 100%;
  }

  .lock-btn {
    width: 100%;
  }

  .copy-btn {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-top: 5px;
  }

  .reveal-btn {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-top: 5px;
  }
}
