/**
 * 江苏省城市足球联赛主题 - 自定义样式补充
 * 
 * @package Jiangsu_League
 * @since 1.0.0
 */

/* ========================================
   队徽样式
   ======================================== */
.team-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: #f5f5f5;
    padding: 5px;
    transition: transform 0.3s;
}

.team-card:hover .team-logo {
    transform: scale(1.1);
}

.team-logo-large {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 50%;
    background: #f5f5f5;
    padding: 10px;
}

.team-logo-sm {
    width: 30px;
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.team-with-logo {
    display: flex;
    align-items: center;
}

.team-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.champion-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f39c12;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 球队卡片样式增强 */
.team-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.team-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: #333;
}

.team-city {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.team-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #555;
}

.team-info p {
    margin: 0.3rem 0;
}

/* 比赛卡片样式 */
.match-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.match-team {
    display: flex;
    align-items: center;
    flex: 1;
}

.match-team.home {
    justify-content: flex-end;
    text-align: right;
    padding-right: 1rem;
}

.match-team.away {
    justify-content: flex-start;
    text-align: left;
    padding-left: 1rem;
}

.match-team .team-name {
    font-size: 0.95rem;
    margin: 0 0.5rem;
}

.match-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
    min-width: 120px;
}

.match-date {
    font-size: 0.85rem;
    color: #666;
}

.match-time {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
}

.match-venue {
    font-size: 0.8rem;
    color: #999;
}

/* 导航栏 logo 样式 */
.navbar-logo {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

/* 球队网格布局 */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.teams-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* 响应式 */
@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .teams-grid.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-logo {
        width: 60px;
        height: 60px;
    }
    
    .team-logo-large {
        width: 100px;
        height: 100px;
    }
    
    .match-card {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .match-team {
        justify-content: center !important;
        text-align: center !important;
        padding: 0 !important;
    }
    
    .match-team .team-name {
        margin: 0 0.3rem;
    }
}

/* ========================================
   城市详情遮罩层
   ======================================== */
.city-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s;
}

.city-modal-content {
  background: white;
  border-radius: 15px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.city-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  color: #666;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10;
}

.city-modal-close:hover {
  color: var(--primary-green);
}

.city-modal-title {
  background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
  color: white;
  padding: 1.5rem;
  border-radius: 15px 15px 0 0;
  margin: 0;
  font-size: 1.8rem;
  text-align: center;
}

.city-modal-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  padding: 1rem;
  border-bottom: 2px solid #f0f0f0;
  margin: 0;
}

.city-modal-content-body {
  padding: 2rem;
}

.city-modal-content-body h3 {
  color: var(--primary-green);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  border-left: 4px solid var(--primary-green);
  padding-left: 10px;
}

.city-modal-content-body p {
  line-height: 1.8;
  color: #333;
  margin-bottom: 1rem;
}

.city-modal-content-body ul {
  list-style: none;
  padding-left: 0;
}

.city-modal-content-body ul li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.city-modal-content-body ul li:before {
  content: "⚽";
  position: absolute;
  left: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .city-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .city-modal-title {
    font-size: 1.4rem;
    padding: 1rem;
  }
  
  .city-modal-content-body {
    padding: 1rem;
  }
}

/* ========================================
   回到顶部按钮
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* ========================================
   小工具样式
   ======================================== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ========================================
   赛季提示横幅
   ======================================== */
.season-notice {
  animation: fadeIn 0.8s ease-out;
}

/* ========================================
   倒计时样式
   ======================================== */
.countdown {
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

/* ========================================
   加载状态
   ======================================== */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ========================================
   空状态
   ======================================== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #999;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* ========================================
   徽章样式
   ======================================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: bold;
}

.badge-primary {
  background: var(--primary-green);
  color: var(--white);
}

.badge-secondary {
  background: var(--primary-blue);
  color: var(--white);
}

.badge-success {
  background: #27ae60;
  color: var(--white);
}

.badge-warning {
  background: #f39c12;
  color: var(--white);
}

.badge-danger {
  background: #e74c3c;
  color: var(--white);
}

/* ========================================
   进度条
   ======================================== */
.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--light-gray);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
  transition: width 0.3s ease;
}

/* ========================================
   标签页
   ======================================== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--light-gray);
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s ease;
}

.tab:hover {
  color: var(--primary-green);
}

.tab.active {
  color: var(--primary-green);
  border-bottom-color: var(--primary-green);
}

/* ========================================
   响应式视频容器
   ======================================== */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ========================================
   引用样式
   ======================================== */
blockquote {
  border-left: 4px solid var(--primary-green);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #666;
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: 0 10px 10px 0;
}

/* ========================================
   代码块
   ======================================== */
pre {
  background: #2d3748;
  color: #f7fafc;
  padding: 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

/* ========================================
   表格增强
   ======================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: var(--light-gray);
  font-weight: 600;
}

tr:hover {
  background: #f9f9f9;
}

/* ========================================
   表单样式
   ======================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

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

/* ========================================
   评论区域
   ======================================== */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--light-gray);
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.comment-author {
  font-weight: bold;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.comment-meta {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1rem;
}

.comment-respond {
  margin-top: 2rem;
}

/* ========================================
   打印样式
   ======================================== */
@media print {
  .navbar,
  .footer,
  .back-to-top,
  .btn {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ========================================
   辅助类
   ======================================== */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ========================================
   动画增强
   ======================================== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounceIn 0.8s ease-out;
}

/* ========================================
   高亮样式
   ======================================== */
.highlight {
  background: linear-gradient(135deg, #fff9c4 0%, #ffecb3 100%);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

/* ========================================
   分隔线
   ======================================== */
.divider {
  height: 2px;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
  margin: 2rem 0;
  border: none;
}
