@charset "utf-8";
/* CSS Document - Rush Hour Game Styles */
.game-container {
    position: relative;
    width: 600px;
    height: 600px;
    float: left;
    margin: 60px;
    z-index: 5;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 10px;
}

.game-info {
    position: relative;
    width: 100%;
    float: left;
    display: block;
    justify-content: center;
    padding: 15px;
    border-radius: 15px;
    margin: 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.infoItem {
    position: relative;
    width: 33%;
    float: right;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
}

.infoItem .label {
    font-size: 44px;
}

.infoItem .value {
    font-size: 52px;
    font-weight: bold;
    margin-top: 5px;
}

#timerValue.low-time {
    color: #ff4444;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.board-container {
    position: relative;
    margin: 0 auto;
    width: 600px;
    height: 600px;
}

.board {
    width: 100%;
    height: 100%;
    background: #8B7AB8;
    border: 8px solid #6B5B94;
    border-radius: 15px;
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 0;
    pointer-events: none;
    z-index: 1;
}

.cell {
    background: transparent;
    border: 1px solid rgba(107, 91, 148, 0.3);
}

.exit {
    position: absolute;
    right: -25px;
    top: calc(33.33% + 8px);
    width: 35px;
    height: calc(16.66% - 16px);
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
    border-radius: 0 10px 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.exit::before {
    content: ">";
    color: white;
    font-weight: bold;
}

.vehicle {
    position: absolute;
    border-radius: 8px;
    cursor: move;
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    user-select: none;
    z-index: 10;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vehicle:hover {
    transform: scale(1.03);
    z-index: 20;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.vehicle.dragging {
    opacity: 0.85;
    z-index: 30;
    cursor: grabbing;
}

.vehicle.main {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: left top;
    background-image: url('images/main.png');
    box-shadow: 0 8px 20px rgba(107, 78, 158, 0.6);
}

.vehicle.single {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: left top;
    background-image: url('images/bsingle.png');
}

.vehicle.double-horizontal {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: left top;
    background-image: url('images/bdouble.png');
}

.vehicle.double-vertical {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: left top;
    background-image: url('images/bdouble2.png');
}

.vehicle.triple-horizontal {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: left top;
    background-image: url('images/btriple.png');
}

.vehicle.triple-vertical {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: left top;
    background-image: url('images/btriple2.png');
}

.win-message {
    display: none;
    position: absolute;
    top: 40px;
    left: 40px;
    width: 950px;
    height: 950px;
    color: white;
    text-align: center;
    z-index: 1000;
    background: rgba(255,255,255,0.85);
    -webkit-border-radius: 25px;
    -moz-border-radius: 25px;
    border-radius: 25px;
    box-shadow: 0px 0px 6.3px 10px rgba(0, 0, 0, 0.2);
}

.game-over {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 5px;
}

.btn:hover {
    transform: scale(1.1);
}

.controls {
    text-align: center;
    margin-top: 20px;
}

.instructions {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 10px;
    color: #333;
}

.instructions p {
    margin: 5px 0;
    font-size: 14px;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-3deg); }
    75% { transform: scale(1.05) rotate(3deg); }
}

.vehicle.celebrate {
    animation: celebrate 0.5s ease-in-out infinite;
}
















