
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/fonts/yMJRMIlzdpvBhQQL_Qq7dy0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
  
}

#game_cover{ z-index: 98; position: fixed; top:0px; left: 0px;   width: 100%;   height: 100%; display: flex; align-items: center;  flex-direction: column;
    flex-wrap: wrap; justify-content: flex-end;
    flex-direction: column;
    background: url("cover.png") center / cover no-repeat;
    background-image: url("cover.png");
    background-position: center;
    background-size: cover;     
    background-repeat: no-repeat; }
#owner_list_swith{ width: 18px; text-align: center;  line-height: 18px;    height: 18px; position: fixed;    right: 60px;    top: 20px;    cursor: pointer;    z-index: 98;
    border: #fff solid 1px;}
#owner_list{  width: 90%; height:auto; margin: 8px auto; padding: 5px;  background: rgba(0, 0, 0, 0.7); font-size: 12px;  border-radius: 10px;}
#owner_list::after, #owner_list::before{clear: both; content: '';}
#owner_list li{list-style: none; width: 80%; height: 28px; margin: auto;   color: #fff; clear:both;  display:flex; justify-content: space-between ; align-items:center; }
#owner_list img{ height:24px; border-radius:50%; vertical-align: middle; }
#owner_list li div{ width:65%; text-align:left; line-height:28px; }
#owner_list li div:first-child{width: 15%;}
#owner_list li div:last-child{width: 20%;}

#game_title{   font-weight: 900;
  font-size: 5rem;
  text-align: center;
  color: #fff;  
  filter: drop-shadow(1px 2px 3px rgba(0, 255, 255, 0.8));
  background: linear-gradient(to right, #ffec0a, #ff00e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  
  /* 添加字母间距，增强未来感 */
  letter-spacing: 0.1em; rotate: -30deg; display: inline-block; transform-origin: center center;  }
.head_anim{animation: heart 1.3s ease-in-out 2.7s infinite alternate;}
@keyframes heart {
  from {
    transform: translate(0, -5px);
  }
  to {
    transform: translate(0, 1px);
  }
}
 
.game_start_ani_title {
  animation: titleDisappear 2s ease-in-out forwards;
}

 
@keyframes titleDisappear {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }    
    60% {
        transform: rotate(180deg) scale(0.8);
        opacity: 0.7;
    }
    65% {
        transform: rotate(360deg) scale(0.5);
        opacity: 0.4;
    }
    100% {
        transform: rotate(450deg) scale(0.3);
        opacity: 0;
        visibility: hidden; /* 动画结束后隐藏元素 */
    }
}

  

.game-container {  display: none;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px; padding-top: 60px;  
}
 

 
.header {
    text-align: center; 
    padding: 10px; 
    backdrop-filter: blur(10px);
}

#soudsbt{background: url(sound.png) no-repeat; width: 24px; height: 24px; z-index: 98; position: absolute; right:120px; top: 20px; z-index: 99; cursor: pointer;}
.soudstop{ -webkit-filter:grayscale(0.9); }
.header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px; 
}
 

.game-stats {
    display: flex; flex-wrap: nowrap; justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px; 
}

.stat-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    border: 1px solid #475569;
    transition: all 0.3s ease;
    position: relative; width: 25%;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-label {
    font-size: 1.1rem;
    color: #94a3b8; 
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #60a5fa;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
}

#attemptsBar {
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.5s ease;
}
.timer-container {
    width: 100%;
    height: 14px;
    background: rgba(71, 85, 105, 0.3);
    border-radius: 7px;
    margin-top: 7px;
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #f472b6, #db2777);
    width: 100%;
    transition: width 1s linear;
    border-radius: 7px;
}

.game-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 400px;
    position: relative;
} 

.section {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 20px;
    padding: 10px;
    border: 1px solid #475569;
    backdrop-filter: blur(10px);
    position: relative; min-height: 200px;
     
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-size: 2rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3b82f6;
    color: #60a5fa;
}

.section-title i {
    font-size: 2.4rem;
}

.items-grid {
    display: flex; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.draggable-item {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 16px;
    padding: 10px;
    cursor: grab;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
     
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    touch-action: none;
    justify-content: space-evenly;
    -webkit-tap-highlight-color: transparent;
}

.draggable-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.draggable-item:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.25);
}

.draggable-item:hover::before {
    opacity: 1;
}

.draggable-item.dragging {
    cursor: grabbing;
    border-color: #f472b6;
    box-shadow: 0 0 40px rgba(244, 114, 182, 0.4);
    transform: scale(1.05);
    opacity: 0.9;
    z-index: 1000;
}

.draggable-item.connected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.draggable-item.connected::before {
    background: linear-gradient(90deg, #10b981, #34d399);
    opacity: 1;
}

.item-icon {
    font-size: 3.5rem;
    transition: transform 0.3s ease; background: #fff;
    height: 72px; width: 72px;     display: flex;
    align-items: center;
    justify-content: center; overflow: hidden;
    border-radius: 8px;
}
.item-icon img{ max-width:80px; }
.draggable-item:hover .item-icon {
    transform: scale(1.1);
}

.drone .item-icon { 
    color: #60a5fa;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
}

.remote .item-icon { 
    color: #f59e0b;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.item-name {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
     
    color: #f8fafc;
}

.item-brand {
    font-size: 1rem;
    color: #94a3b8;
    padding: 6px 16px;
    background: rgba(71, 85, 105, 0.4);
    border-radius: 20px;
     
}

.connections-count {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
}

.controls {
    display: flex;  
    margin-top: 8px;
    flex-wrap: nowrap;
    justify-content: space-around;
}

.gamebox .btn {
    padding: 9px 20px;
    font-size: 1.3rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.gamebox .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.gamebox .btn:hover::before {
    left: 100%;
}

.gamebox .btn-primary {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.gamebox .btn-success {
    background: linear-gradient(90deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.gamebox .btn-secondary {
    background: linear-gradient(90deg, #f472b6, #db2777);
    color: white;
    box-shadow: 0 8px 25px rgba(244, 114, 182, 0.4);
}

.gamebox .btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.gamebox .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gamebox .btn:disabled:hover::before {
    left: -100%;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#connection-canvas {
    width: 100%;
    height: 100%;
}

#game_desc { display: none; clear: both;} 

.connections-panel { display: none;
    margin-top: 25px;
    padding: 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    border: 1px solid #475569;
}

.connections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3b82f6;
}

.connections-title {
    font-size: 1.5rem;
    color: #60a5fa;
    font-weight: bold;
}

.connections-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.connection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(15, 23, 42, 0.7);
    border-radius: 10px;
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.connection-item:hover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

.connection-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.connection-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.connection-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.connection-status.correct {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.connection-status.incorrect {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.remove-connection {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-connection:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: scale(1.1);
}

.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(15px);
}

.message-box {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 25px;
    padding: 50px;
    max-width: 700px;
    width: 90%;
    text-align: center; 
    box-shadow: 0 25px 60px rgba(59, 130, 246, 0.3);
    animation: messageAppear 0.5s ease-out;
}
.btn_msg{display: flex; gap: 10px;}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-title {
    font-size: 2.8rem;
    color: #60a5fa;
    margin-bottom: 25px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.message-content {
    font-size: 1.4rem;
    line-height: 1.7;
    color: #e2e8f0;
    margin-bottom: 35px;
}

.score-details {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
    border: 1px solid #475569;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

.detail-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    color: #94a3b8;
    font-size: 1.2rem;
}

.detail-value {
    color: #60a5fa;
    font-weight: bold;
    font-size: 1.3rem;
}

.detail-value.highlight {
    color: #10b981;
    font-size: 1.5rem;
}

.level-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
    padding: 5px; 
}

.level-badge {
    background: linear-gradient(90deg, #f472b6, #db2777);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(244, 114, 182, 0.3);
}

.level-desc {
    color: #f90; 
    flex: 1;
}

/* 拖拽连线动画 */
@keyframes pulseLine {
    0% {
        stroke-width: 3;
        stroke-opacity: 0.8;
    }
    50% {
        stroke-width: 5;
        stroke-opacity: 1;
    }
    100% {
        stroke-width: 3;
        stroke-opacity: 0.8;
    }
}

@keyframes successGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.8));
    }
    100% {
        filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5));
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .draggable-item { 
        padding: 10px;
    }
    
     
}

/* 滚动条样式 */
.connections-list::-webkit-scrollbar {
    width: 8px;
}

.connections-list::-webkit-scrollbar-track {
    background: rgba(71, 85, 105, 0.3);
    border-radius: 4px;
}

.connections-list::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

.connections-list::-webkit-scrollbar-thumb:hover {
    background: #60a5fa;
}

/* 连接点 */
.connection-point {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    border: 3px solid #6cdcff;
    cursor: pointer;
    z-index: 200;
    transition: all 0.3s ease;
}

.connection-point.drone-point {
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point.remote-point {
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
}

.connection-point.active {
    background: #f472b6;
    transform: scale(1.3) translateY(-50%);
    animation: pointPulse 1s infinite;
}

@keyframes pointPulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 114, 182, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(244, 114, 182, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 114, 182, 0); }
}

.drop-target {
    border-color: #f472b6 !important;
    box-shadow: 0 0 30px rgba(244, 114, 182, 0.4) !important;
}

 
    
@media (max-width: 768px) {

  
  .game-area {
        grid-template-columns: 1fr;
        gap: 10px;
    }
  .items-grid{
        flex-direction: row;
    }
 
 .game-container{padding: 10px;}
 .level-info{margin-bottom: 8px;}
 .draggable-item{padding: 5px; width: auto;}
 .game-stats{margin-bottom: 8px;}
 .message-box {  padding: 10px;}
 .timer-container{margin-top: 0px; height: 5px; }
 .detail-row{ margin-bottom:10px;  padding-bottom: 5px;}
 .stat-card{padding: 3px;}
 .header h1{font-size: 1.8rem; margin-bottom: 0px; }
 .level-desc{font-size: 1rem;}
 .level-badge{padding: 4px 8px;}
 .connection-point.drone-point{ top: unset; bottom: -8px;    left:calc(50% - 8px);    }
 .connection-point.remote-point{ top: 8px;  left:calc(50% - 8px);    }
}