/* Giant's Causeway Board Styles
   Basalt columns rising from the sea between Ireland and Scotland */

.causeway-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;
    user-select: none;
    padding: 20px;
    background: linear-gradient(180deg, #1e3a5f 0%, #0c1929 100%);
    border-radius: 20px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: visible;
}

.flag-ireland {
    position: absolute;
    left: 16px;
    bottom: 16px;
    font-size: 3.5rem;
    opacity: 0.7;
    pointer-events: none;
    z-index: 10;
}

.flag-scotland {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 3.5rem;
    opacity: 0.7;
    pointer-events: none;
    z-index: 10;
}

.causeway-row {
    display: flex;
    margin: -8px 0;
    position: relative;
    justify-content: center;
}

.causeway-hex {
    width: 60px;
    height: 68px;
    margin: 0 3px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hex-content {
    width: 100%;
    height: 100%;
    position: relative;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hex-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Sea tiles - deep blue water */
.tile-sea .hex-content {
    background: linear-gradient(180deg, #1a4a6e 0%, #0d2840 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tile-sea:hover .hex-content {
    background: linear-gradient(180deg, #2a5a7e 0%, #1d3850 100%);
}

/* Rock tiles - impassable */
.tile-rock .hex-content {
    background: linear-gradient(180deg, #4a4a4a 0%, #2a2a2a 100%);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.tile-rock:hover .hex-content {
    cursor: not-allowed;
    filter: brightness(0.9);
}

/* Island tiles - neutral claimable */
.tile-island .hex-content {
    background: linear-gradient(180deg, #6b5a3a 0%, #4a3a2a 100%);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.tile-island.tile-height-1 .hex-content {
    background: linear-gradient(180deg, #7b6a4a 0%, #5a4a3a 100%);
    transform: translateY(-2px);
}

/* Shore tiles - sandy edges */
.tile-shore .hex-content {
    border: 2px solid rgba(255, 215, 130, 0.4);
}

.tile-shore-1 .hex-content {
    /* Ireland shore - green tint */
    background: linear-gradient(180deg, #1a5a5e 0%, #0d3840 100%);
}

.tile-shore-2 .hex-content {
    /* Scotland shore - blue tint */
    background: linear-gradient(180deg, #1a4a7e 0%, #0d2850 100%);
}

/* Ireland columns - emerald/dark basalt */
.tile-ireland .hex-content {
    background: linear-gradient(180deg, #2d5a4a 0%, #1a3830 100%);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.tile-ireland.tile-height-1 .hex-content {
    background: linear-gradient(180deg, #3d6a5a 0%, #2a4840 100%);
    transform: translateY(-2px);
}

.tile-ireland.tile-height-2 .hex-content {
    background: linear-gradient(180deg, #4d7a6a 0%, #3a5850 100%);
    transform: translateY(-4px);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.4);
}

.tile-ireland.tile-height-3 .hex-content {
    background: linear-gradient(180deg, #5d8a7a 0%, #4a6860 100%);
    transform: translateY(-6px);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.5);
}

/* Scotland columns - steel blue basalt */
.tile-scotland .hex-content {
    background: linear-gradient(180deg, #3a5070 0%, #253548 100%);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.tile-scotland.tile-height-1 .hex-content {
    background: linear-gradient(180deg, #4a6080 0%, #354558 100%);
    transform: translateY(-2px);
}

.tile-scotland.tile-height-2 .hex-content {
    background: linear-gradient(180deg, #5a7090 0%, #455568 100%);
    transform: translateY(-4px);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.4);
}

.tile-scotland.tile-height-3 .hex-content {
    background: linear-gradient(180deg, #6a80a0 0%, #556578 100%);
    transform: translateY(-6px);
    box-shadow:
        inset 0 -3px 8px rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.5);
}

/* Hot columns - glowing lava effect */
.tile-hot .hex-content {
    animation: lava-glow 1s ease-in-out infinite alternate;
}

.tile-hot::before {
    content: '';
    position: absolute;
    inset: -4px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(180deg, #ff6b35, #ff4500);
    opacity: 0.6;
    animation: pulse-glow 1s ease-in-out infinite;
    z-index: -1;
}

@keyframes lava-glow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Height indicator */
.height-indicator {
    font-size: 18px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Hot indicator (fire emoji) */
.hot-indicator {
    font-size: 14px;
    position: absolute;
    top: -2px;
    right: 2px;
}

/* Hover states */
.causeway-hex:hover {
    transform: scale(1.08);
    z-index: 10;
}

.causeway-hex:hover .hex-content {
    filter: brightness(1.15);
}

/* Valid move highlighting */
.causeway-hex.valid-move .hex-content {
    animation: valid-pulse 1.5s ease-in-out infinite;
}

.causeway-hex.valid-move::after {
    content: '';
    position: absolute;
    inset: -2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(255, 215, 0, 0.3);
    animation: valid-border-pulse 1.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes valid-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

@keyframes valid-border-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Can raise indicator */
.causeway-hex.can-raise::after {
    background: rgba(100, 255, 100, 0.3);
}

/* Can challenge indicator */
.causeway-hex.can-challenge::after {
    background: rgba(255, 100, 100, 0.3);
}

/* Invalid click feedback */
.causeway-hex.invalid-click {
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Winning path highlight */
.causeway-hex.winning-path .hex-content {
    animation: victory-glow 0.5s ease-in-out infinite alternate;
}

@keyframes victory-glow {
    0% { filter: brightness(1) drop-shadow(0 0 5px gold); }
    100% { filter: brightness(1.3) drop-shadow(0 0 15px gold); }
}

/* Action button active state */
.action-btn.active {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #1e293b !important;
}

/* Responsive */
@media (max-width: 768px) {
    .causeway-hex {
        width: 46px;
        height: 52px;
    }

    .height-indicator {
        font-size: 14px;
    }

    .hot-indicator {
        font-size: 10px;
    }

    .causeway-row {
        margin: -6px 0;
    }
}

@media (max-width: 480px) {
    .causeway-hex {
        width: 36px;
        height: 42px;
        margin: 0 2px;
    }

    .causeway-row {
        margin: -5px 0;
    }

    .height-indicator {
        font-size: 12px;
    }

    .hot-indicator {
        font-size: 8px;
        top: 0;
        right: 0;
    }
}
