:root {
    --primary: #0089d1;
    --primary-dark: #005a8d;
    --secondary: #4CAF50;
    --accent: #ff9800;
    --bg-light: #f1f5f9;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --gradient-header: linear-gradient(135deg, #0089d1 0%, #005a8d 100%);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 25px 30px -10px rgba(0, 0, 0, 0.2), 0 15px 15px -10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Refinement */
.main-header {
    background: var(--gradient-header);
    padding: 5rem 2rem;
    text-align: center;
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: 6px solid var(--secondary);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    z-index: 1;
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.logo-area {
    margin-bottom: 1.5rem;
}

.logo-area i {
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo-area h1 {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.logo-area p {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
}

.badge-area {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.2rem;
}

.badge {
    background: rgba(255,255,255,0.1);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.badge.secondary {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.3);
}

/* Road Map Container */
.road-container {
    position: relative;
    max-width: 1100px;
    margin: 6rem auto;
    padding: 0 2rem;
    min-height: 4600px;
}

.road-svg {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: 4400px;
    z-index: 1;
    pointer-events: none;
}

.road-path-active {
    stroke-dasharray: 4500;
    stroke-dashoffset: 4500;
    transition: stroke-dashoffset 1s ease-in-out;
}

/* Marker States */
.marker.completed {
    background: var(--secondary);
    color: var(--white);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
    border-color: var(--secondary);
}

.marker.completed::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--white);
    color: var(--secondary);
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
}

/* Step Points */
.step-point {
    position: absolute;
    z-index: 50;
    width: 350px;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
    animation-delay: calc(var(--delay) * 0.25s);
    border: 1px solid rgba(0,0,0,0.05);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Correct positioning logic for items at 50% left to remain centered */
.step-point[style*="left: 50%"] {
    transform: translateX(-50%);
}
@keyframes fadeInUpCentered {
    from { opacity: 0; transform: translate(-50%, 40px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
.step-point[style*="left: 50%"] {
    animation-name: fadeInUpCentered;
}

.step-point:hover {
    z-index: 100;
}

.marker {
    width: 80px;
    height: 80px;
    background: var(--white);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 0 0 8px rgba(255, 152, 0, 0.15), var(--card-shadow);
    border: 6px solid var(--accent);
    margin: 0 auto 1.5rem;
    position: relative;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-point:hover .marker {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 0 0 15px rgba(255, 152, 0, 0.2);
    transform: translateY(-5px) rotate(15deg);
}

.marker span {
    font-size: 0.9rem;
    font-weight: 800;
    margin-top: -2px;
}

.content-box {
    background: var(--white);
    padding: 2.2rem;
    border-radius: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.content-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary);
    transition: height 0.3s ease;
}

.step-point:nth-child(even) .content-box::after {
    background: var(--secondary);
}

.step-point:hover .content-box {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-8px);
}

.step-point:hover .content-box::after {
    height: 12px;
}

.content-box h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 0.8rem;
    font-weight: 800;
}

.content-box p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.8rem;
}


/* Hover info box */
.hover-info {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
    background: #f0f9ff;
    border: 2px dashed #0089d1;
    border-radius: 1rem;
    margin: 0;
    padding: 0;
    text-align: left;
}

.step-point:hover .hover-info {
    max-height: 300px;
    opacity: 1;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
}

.hover-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.hover-detail:last-child {
    margin-bottom: 0;
}

.hover-detail i {
    color: var(--primary);
    width: 20px;
    text-align: center;
    margin-top: 4px;
    font-size: 0.9rem;
}

.hover-detail .label {
    font-weight: 800;
    color: var(--text-main);
    min-width: 85px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hover-detail .text {
    color: var(--text-muted);
    flex: 1;
}

.step-point[data-step="2"] .hover-info,
.step-point[data-step="4"] .hover-info,
.step-point[data-step="6"] .hover-info,
.step-point[data-step="8"] .hover-info,
.step-point[data-step="10"] .hover-info {
    background: #f0fdf4;
    border-color: #4CAF50;
}

.step-point[data-step="2"] .hover-detail i,
.step-point[data-step="4"] .hover-detail i,
.step-point[data-step="6"] .hover-detail i,
.step-point[data-step="8"] .hover-detail i,
.step-point[data-step="10"] .hover-detail i {
    color: var(--secondary);
}

/* Actions */
.actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.4rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    cursor: pointer;
}

.notebook-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.complete-btn {
    background: #ff9800;
    color: white !important;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.completed-btn {
    background: #4CAF50;
    color: white !important;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.info-btn {
    background: #f8fafc;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}

.pdf-btn {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0, 137, 209, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 750px;
    border-radius: 2.5rem;
    position: relative;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
    animation: modalPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 3rem;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
}

.close-btn:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

#modalBody {
    padding: 3.5rem;
}

/* Footer Section */
.main-footer {
    background: var(--white);
    padding: 5rem 2rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.brand {
    margin-bottom: 2.5rem;
}

.brand .powered {
    display: block;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.brand .pikto {
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slogan {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.8rem;
    font-weight: 500;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Control */
@media (max-width: 1100px) {
    .road-container {
        padding: 4rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4rem;
        min-height: auto;
    }
    
    .road-svg {
        display: none;
    }
    
    .step-point {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100%;
        max-width: 500px;
        opacity: 1;
        animation: fadeInUp 0.8s forwards;
    }

    .step-point[style*="left: 50%"] {
        animation-name: fadeInUp;
        transform: none !important;
    }

    .logo-area h1 {
        font-size: 2.4rem;
    }
}


/* Decoration Elements */
.decoration {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s;
}
.decoration.cloud {
    color: var(--white);
}
.decoration:not(.cloud) {
    color: var(--secondary);
}
