.comp-detail {
  background-color: #000;
  min-height: 100vh;
  padding-bottom: 80px;

  .banner {
    width: 100%;
    height: 300px;
    display: block;
  }

  .content {
    padding: 24px;
    background: #111;
    border-radius: 16px 16px 0 0;
    margin-top: -24px;
    position: relative;
    z-index: 10;

    .header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 24px;

      .title {
        font-size: 24px;
        font-weight: bold;
        color: #fff;
        line-height: 1.4;
      }

      .status {
        font-size: 14px;
        padding: 4px 8px;
        border-radius: 4px;
        background: #333;
        color: #ccc;
        margin-left: 12px;
        white-space: nowrap;

        &.registration { background: #07c160; color: #fff; }
        &.submission { background: #1890ff; color: #fff; }
        &.judging { background: #faad14; color: #fff; }
        &.ended { background: #ff4d4f; color: #fff; }
      }
    }

    .tabs {
      display: flex;
      margin-bottom: 24px;
      border-bottom: 1px solid #333;
      
      .tab-item {
        flex: 1;
        text-align: center;
        padding: 12px 0;
        color: #999;
        font-size: 16px;
        position: relative;
        
        &.active {
          color: #fff;
          font-weight: bold;
          
          &:after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 50%;
            transform: translateX(-50%);
            width: 24px;
            height: 3px;
            background: #00b96b;
            border-radius: 2px;
          }
        }
      }
    }

    .project-list {
      .project-card {
        background: #1f1f1f;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 16px;
        display: flex;
        
        .cover {
          width: 120px;
          height: 90px;
          background: #333;
          flex-shrink: 0;
        }
        
        .info {
          flex: 1;
          padding: 12px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          overflow: hidden;
          
          .title {
            font-size: 16px;
            color: #fff;
            font-weight: 500;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
          }
          
          .author {
            display: flex;
            align-items: center;
            justify-content: space-between;
            
            .user {
              display: flex;
              align-items: center;
              font-size: 12px;
              color: #999;
              
              .avatar {
                width: 20px;
                height: 20px;
                border-radius: 50%;
                margin-right: 6px;
                background: #333;
              }
            }
            
            .score {
              color: #faad14;
              font-weight: bold;
              font-size: 14px;
            }
          }
        }
      }
      .empty {
          text-align: center;
          color: #666;
          padding: 40px 0;
      }
    }
    
    .ranking-list {
       .rank-item {
         display: flex;
         align-items: center;
         padding: 16px 0;
         border-bottom: 1px solid #222;
         
         .rank-num {
           width: 40px;
           text-align: center;
           font-size: 18px;
           font-weight: bold;
           color: #666;
           
           &.top1 { color: #ffd700; }
           &.top2 { color: #c0c0c0; }
           &.top3 { color: #cd7f32; }
         }
         
         .info {
           flex: 1;
           display: flex;
           align-items: center;
           overflow: hidden;
           
           .avatar {
             width: 40px;
             height: 40px;
             border-radius: 50%;
             margin-right: 12px;
             background: #333;
             flex-shrink: 0;
           }
           
           .detail {
             flex: 1;
             overflow: hidden;
             
             .nickname {
               color: #fff;
               font-size: 16px;
               margin-bottom: 4px;
               display: block;
               white-space: nowrap;
               overflow: hidden;
               text-overflow: ellipsis;
             }
             
             .project-title {
               color: #666;
               font-size: 12px;
               white-space: nowrap;
               overflow: hidden;
               text-overflow: ellipsis;
             }
           }
         }
         
         .score {
           font-size: 18px;
           font-weight: bold;
           color: #00b96b;
           margin-left: 12px;
         }
       }
       .empty {
          text-align: center;
          color: #666;
          padding: 40px 0;
      }
    }

    .section {
      margin-bottom: 32px;

      .section-title {
        font-size: 18px;
        font-weight: bold;
        color: #fff;
        margin-bottom: 12px;
        display: block;
        border-left: 4px solid #00b96b;
        padding-left: 12px;
      }

      /* Markdown styling borrowed from Forum */
      font-size: 16px;
      line-height: 1.8;
      color: #e0e0e0;
      letter-spacing: 0.3px;
      
      image {
        max-width: 100%;
        border-radius: 12px;
        margin: 16px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      }
      
      h1, h2, h3, h4, h5, h6 { margin-top: 24px; margin-bottom: 16px; color: #fff; font-weight: 700; line-height: 1.4; }
      h1 { font-size: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; }
      h2 { font-size: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 8px; }
      h3 { font-size: 18px; }
      h4 { font-size: 17px; }
      h5 { font-size: 16px; color: #ddd; }
      
      p { margin-bottom: 16px; }
      
      strong { font-weight: 800; color: #fff; }
      em { font-style: italic; color: #aaa; }
      del { text-decoration: line-through; color: #666; }
      
      ul, ol { margin-bottom: 16px; padding-left: 20px; }
      li { margin-bottom: 6px; list-style-position: outside; }
      ul li { list-style-type: disc; }
      ol li { list-style-type: decimal; }
      
      li input[type="checkbox"] { margin-right: 8px; }

      blockquote {
          border-left: 4px solid #00b96b;
          background: rgba(255, 255, 255, 0.05);
          padding: 12px 16px;
          margin: 16px 0;
          border-radius: 4px;
          color: #bbb;
          font-size: 15px;
          font-style: italic;
          
          p { margin-bottom: 0; }
      }
      
      a { color: #00b96b; text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
      
      hr {
          height: 1px;
          background: rgba(255,255,255,0.1);
          border: none;
          margin: 24px 0;
      }
      
      table {
          width: 100%;
          border-collapse: collapse;
          margin: 16px 0;
          font-size: 14px;
          overflow-x: auto;
          display: block;
          
          th, td {
              border: 1px solid rgba(255,255,255,0.1);
              padding: 10px;
              text-align: left;
          }
          
          th {
              background: rgba(255,255,255,0.05);
              font-weight: 700;
              color: #fff;
          }
          
          tr:nth-child(even) {
              background: rgba(255,255,255,0.02);
          }
      }

      code {
          background: rgba(255,255,255,0.1);
          padding: 2px 6px;
          border-radius: 4px;
          font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
          color: #ff7875;
          font-size: 14px;
          margin: 0 4px;
      }
      
      pre {
          background: #161616;
          padding: 16px;
          border-radius: 12px;
          overflow-x: auto;
          margin: 16px 0;
          border: 1px solid #333;
          box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
          
          code { 
              background: transparent; 
              color: #a6e22e; 
              padding: 0; 
              font-size: 13px; 
              margin: 0;
              white-space: pre;
          }
      }
    }
  }

  .footer-action {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f1f1f;
    padding: 16px 24px;
    border-top: 1px solid #333;
    z-index: 100;

    .btn {
      width: 100%;
      height: 48px;
      line-height: 48px;
      border-radius: 24px;
      font-size: 18px;
      font-weight: bold;
      color: #fff;
      background: #00b96b;
      border: none;

      &.disabled {
        background: #333;
        color: #666;
      }

      &.enrolled {
        background: #1890ff;
      }
    }
  }
}
