* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e8e8e8;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated track lines background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, rgba(0, 173, 181, 0.1) 2px, transparent 2px),
        linear-gradient(0deg, rgba(0, 173, 181, 0.05) 1px, transparent 1px);
    background-size: 100px 50px;
    animation: trackMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes trackMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100px);
    }
}

/* Electric glow particles */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 25% 40%, rgba(0, 173, 181, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 60%, rgba(233, 69, 96, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 30%, rgba(255, 195, 0, 0.1) 0%, transparent 50%);
    animation: electricGlow 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes electricGlow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(20px, -20px) scale(1.05);
        opacity: 0.8;
    }
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

/* Dynamic Header */
header {
    background: rgba(26, 26, 46, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(0, 173, 181, 0.4);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 173, 181, 0.2),
        0 0 60px rgba(0, 173, 181, 0.1) inset;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding {
    flex: 1;
    min-width: 200px;
}

.site-title a {
    text-decoration: none;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00adb5 0%, #ffc300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    filter: drop-shadow(0 0 20px rgba(0, 173, 181, 0.4));
}

.site-title a:hover {
    filter: drop-shadow(0 0 30px rgba(0, 173, 181, 0.7));
    letter-spacing: 6px;
}

.site-tagline {
    font-size: 0.85rem;
    color: #00adb5;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 0.3rem;
    font-weight: 300;
}

/* Navigation Menu */
#menu {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

#menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

#menu li {
    margin: 0 1rem;
    font-size: 1rem;
    line-height: 2.5rem;
    position: relative;
}

#menu li::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00adb5, #ffc300);
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 173, 181, 0.6);
}

#menu li:hover::before {
    width: 100%;
}

#menu a {
    text-decoration: none;
    color: #e8e8e8;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#menu li:hover a {
    color: #00adb5;
    text-shadow: 0 0 20px rgba(0, 173, 181, 0.5);
}

/* Hero Section with Tram Theme */
.hero-section {
    text-align: center;
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(22, 33, 62, 0.6) 100%);
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00adb5 0%, #ffc300 50%, #e94560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 15px;
    position: relative;
    filter: drop-shadow(0 0 40px rgba(0, 173, 181, 0.4));
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {

    0%,
    100% {
        filter: drop-shadow(0 0 40px rgba(0, 173, 181, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 60px rgba(255, 195, 0, 0.6));
    }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #00adb5;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 300;
    margin-top: 2rem;
    text-shadow: 0 0 20px rgba(0, 173, 181, 0.3);
}

/* Animated Tram SVG */
.tram-svg {
    width: 100%;
    height: 180px;
    margin-top: 3rem;
}

.tram-track {
    stroke: #00adb5;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawTrack 3s ease-in-out forwards;
    filter: drop-shadow(0 0 8px rgba(0, 173, 181, 0.6));
}

@keyframes drawTrack {
    to {
        stroke-dashoffset: 0;
    }
}

.tram-body {
    fill: #ffc300;
    opacity: 0;
    animation: tramArrive 2s ease-out 1s forwards;
    filter: drop-shadow(0 0 10px rgba(255, 195, 0, 0.6));
}

@keyframes tramArrive {
    from {
        transform: translateX(-200px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 0.9;
    }
}

.tram-window {
    fill: #00adb5;
    opacity: 0;
    animation: windowLight 1.5s ease-in 2s forwards;
}

@keyframes windowLight {
    to {
        opacity: 0.8;
    }
}

.power-line {
    stroke: #e94560;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPowerLine 2s ease-in-out 0.5s forwards;
    filter: drop-shadow(0 0 6px rgba(233, 69, 96, 0.5));
}

@keyframes drawPowerLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Tram Gallery Section */
.tram-gallery {
    max-width: 1600px;
    margin: 3rem auto;
    padding: 0 2rem 4rem;
}

.country-section {
    margin-bottom: 4rem;
}

.country-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00adb5 0%, #ffc300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 20px;
}

.country-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background: linear-gradient(180deg, #00adb5, #ffc300);
    box-shadow: 0 0 15px rgba(0, 173, 181, 0.6);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    justify-items: center;
}

.gallery-grid .tram-card {
    max-width: 450px;
    width: 100%;
}

/* Tram Card - Urban Design */
.tram-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    isolation: isolate;
    z-index: 1;
}

.tram-card:hover {
    transform: translateY(-15px) scale(1.02);
    z-index: 10;
}

/* Electric border effect */
.card-container {
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    border-radius: 15px;
    border: 2px solid rgba(0, 173, 181, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 173, 181, 0.2) inset;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.tram-card:hover .card-container {
    border-color: rgba(0, 173, 181, 0.8);
    box-shadow: 0 20px 60px rgba(0, 173, 181, 0.4),
        0 0 40px rgba(255, 195, 0, 0.2) inset;
}

/* Moving electricity lines */
.electricity-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tram-card:hover .electricity-lines {
    opacity: 1;
}

.electric-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #00adb5, transparent);
    height: 1px;
    width: 100%;
    animation: electricFlow 1.5s linear infinite;
    box-shadow: 0 0 10px rgba(0, 173, 181, 0.8);
}

.electric-line:nth-child(1) {
    top: 25%;
    animation-delay: 0s;
}

.electric-line:nth-child(2) {
    top: 50%;
    animation-delay: 0.3s;
}

.electric-line:nth-child(3) {
    top: 75%;
    animation-delay: 0.6s;
}

@keyframes electricFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Speed motion effect */
.motion-blur {
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 195, 0, 0.1),
            transparent);
    z-index: 3;
    pointer-events: none;
}

.tram-card:hover .motion-blur {
    animation: speedMotion 1.5s ease-in-out;
}

@keyframes speedMotion {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Image Container */
.tram-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 15px;
}

/* Portrait orientation - manually add this class to portrait images */
.tram-image-wrapper.portrait {
    aspect-ratio: 3/4;
}

.tram-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(0, 173, 181, 0.15) 0%,
            transparent 50%,
            rgba(255, 195, 0, 0.15) 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.tram-card:hover .tram-image-wrapper::before {
    opacity: 0.6;
}

.tram-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(0.9) contrast(1.1) brightness(0.95);
}

.tram-card:hover .tram-image {
    transform: scale(1.1);
    filter: saturate(1.2) contrast(1.2) brightness(1.05);
}

/* Tram Info Overlay */
.tram-info {
    position: relative;
    padding: 2rem;
    z-index: 5;
    background: linear-gradient(to top,
            rgba(26, 26, 46, 0.98) 0%,
            rgba(26, 26, 46, 0.85) 60%,
            transparent 100%);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-radius: 0 0 15px 15px;
    border-top: 1px solid rgba(0, 173, 181, 0.4);
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.tram-location {
    font-size: 1.8rem;
    font-weight: 800;
    color: #00adb5;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    transition: all 0.3s ease;
    text-shadow: 0 0 20px rgba(0, 173, 181, 0.5);
}

.tram-card:hover .tram-location {
    color: #ffc300;
    text-shadow: 0 0 30px rgba(255, 195, 0, 0.6);
}

/* Circuit board corners */
.circuit-corner {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    width: 40px;
    height: 40px;
}

.circuit-tl {
    top: 10px;
    left: 10px;
    border-top: 3px solid rgba(0, 173, 181, 0.5);
    border-left: 3px solid rgba(0, 173, 181, 0.5);
    transition: all 0.4s ease;
}

.circuit-tr {
    top: 10px;
    right: 10px;
    border-top: 3px solid rgba(0, 173, 181, 0.5);
    border-right: 3px solid rgba(0, 173, 181, 0.5);
    transition: all 0.4s ease;
}

.circuit-bl {
    bottom: 10px;
    left: 10px;
    border-bottom: 3px solid rgba(0, 173, 181, 0.5);
    border-left: 3px solid rgba(0, 173, 181, 0.5);
    transition: all 0.4s ease;
}

.circuit-br {
    bottom: 10px;
    right: 10px;
    border-bottom: 3px solid rgba(0, 173, 181, 0.5);
    border-right: 3px solid rgba(0, 173, 181, 0.5);
    transition: all 0.4s ease;
}

.tram-card:hover .circuit-corner {
    border-color: rgba(255, 195, 0, 1);
    box-shadow: 0 0 15px rgba(255, 195, 0, 0.6);
    width: 50px;
    height: 50px;
}

/* Footer with Urban Style */
footer {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 2px solid rgba(0, 173, 181, 0.4);
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
    box-shadow: 0 -4px 30px rgba(0, 173, 181, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-title {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #00adb5 0%, #ffc300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

#langlist {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 50px;
    padding: 0.5rem;
    border: 2px solid rgba(0, 173, 181, 0.4);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(0, 173, 181, 0.2) inset;
}

#langlist li {
    display: inline-block;
    list-style: none;
    margin: 0.3rem;
    padding: 0.7rem 1.3rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

#langlist a {
    text-decoration: none;
    color: #e8e8e8;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

#langlist .highlight {
    background: linear-gradient(135deg, #00adb5, #ffc300);
    box-shadow: 0 0 20px rgba(0, 173, 181, 0.6);
}

#langlist .highlight a {
    color: #1a1a2e;
    font-weight: bold;
}

#langlist li:not(.highlight):hover {
    background: rgba(0, 173, 181, 0.3);
    box-shadow: 0 0 15px rgba(0, 173, 181, 0.4);
}

#langlist li:not(.highlight):hover a {
    color: #00adb5;
    text-shadow: 0 0 10px rgba(0, 173, 181, 0.6);
}

.footer-credits {
    color: #00adb5;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-top: 2rem;
    font-weight: 400;
}

.footer-credits strong {
    background: linear-gradient(135deg, #00adb5 0%, #ffc300 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

/* Responsive Design */
@media screen and (max-width: 968px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .site-branding {
        margin-bottom: 1rem;
    }

    #menu {
        justify-content: center;
    }

    #menu ul {
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }

    .hero-title {
        font-size: 3.5rem;
        letter-spacing: 8px;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    .tram-card {
        }

    .tram-location {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 600px) {
    .site-title a {
        font-size: 1.5rem;
    }

    .site-tagline {
        font-size: 0.75rem;
    }

    #menu li {
        margin: 0 0.5rem;
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 5px;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tram-card {
        }

    .tram-location {
        font-size: 1.3rem;
    }

    .tram-info {
        padding: 1.5rem;
    }

    .country-title {
        font-size: 2rem;
    }
}
