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

:root {
    --primary-color: #0077cc;
    --nav-footer-bg: #2c3e50;
    --secondary-color: #ecf0f1;
    --accent-color: #e67e22;
    --text-color: #34495e;
    --light-text-color: #ffffff;
    --background-color: #f8f9fa;
    --container-bg: #ffffff;
    --border-color: #d1d8dd; 
    --shadow-color: rgba(0, 0, 0, 0.06);
    --font-family: 'Poppins', sans-serif;
    --border-radius: 5px; 
    --transition-speed: 0.2s ease;
}

body {
    font-family: var(--font-family);
    line-height: 1.5; 
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 13.5px; 
}

.topnav {
    background-color: var(--nav-footer-bg);
    padding: 0.45rem 0; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.topnav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 10px; 
}

.topnav a {
    color: var(--light-text-color);
    text-decoration: none;
    font-size: 0.9rem; 
    font-weight: 400; 
    padding: 0.35rem 0.75rem; 
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed);
}

.topnav a:hover,
.topnav a:focus {
    background-color: rgba(255, 255, 255, 0.12);
}

.container {
    width: 90%;
    max-width: 720px; 
    margin: 1.2rem auto; 
    padding: 1.3rem; 
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 3px 9px var(--shadow-color);
    flex-grow: 1;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 0.6rem; 
    text-align: center;
    font-weight: 600;
    font-size: 1.65rem; 
}

.app-description {
    text-align: center;
    font-size: 0.9rem; 
    color: #505050; 
    margin-bottom: 1.4rem; 
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55; 
}

#skylineForm {
    margin-bottom: 1.4rem; 
}

.form-group {
    margin-bottom: 0.8rem; 
}

.form-group:last-child {
    margin-bottom: 0;
}

#skylineForm label {
    display: block;
    margin-bottom: 0.25rem; 
    font-weight: 500;
    color: #2c3e50; 
    font-size: 0.8rem; 
}

#skylineForm select {
    width: 100%;
    padding: 0.5rem 0.6rem; 
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
    font-family: var(--font-family);
    font-size: 0.85rem; 
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 1em; 
    height: 32px; 
}

#skylineForm select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.18);
}

#skylineForm button[type="submit"] {
    width: 100%;
    padding: 0.6rem 1rem; 
    background-color: var(--accent-color);
    color: var(--light-text-color);
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem; 
    font-weight: 500; 
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.4rem; 
    height: 34px; 
}

#skylineForm button[type="submit"]:hover,
#skylineForm button[type="submit"]:focus {
    background-color: #d35400;
    transform: translateY(0px); 
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

#skylineChart {
    width: 100%;
    max-width: 700px; 
    margin: 1.2rem auto; 
    display: block;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
}

#timing {
    text-align: center;
    margin: 1.2rem 0 0.6rem 0; 
    padding: 0.45rem; 
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.8rem; 
}

footer {
    background-color: var(--nav-footer-bg);
    color: var(--light-text-color);
    text-align: center;
    padding: 0.9rem 0; 
    margin-top: auto;
}

footer p {
    margin: 0;
    font-size: 0.78rem; 
    opacity: 0.75;
}

@media screen and (max-width: 768px) {
    body {
        font-size: 13px; 
        line-height: 1.45;
    }
    .container {
        width: 95%;
        padding: 1rem; 
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }
    .app-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }

    #skylineForm label {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    #skylineForm select {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
        height: 30px;
        background-position: right 0.5rem center;
    }
    #skylineForm button[type="submit"] {
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
        height: 32px;
    }

    .topnav a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    #timing {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 12.5px; 
        line-height: 1.4;
    }
    .container {
        width: 100%;
        margin: 0;
        border-radius: 0;
        padding: 0.8rem 0.6rem; 
        box-shadow: none;
    }

    h1 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }
    .app-description {
        font-size: 0.78rem;
        margin-bottom: 0.8rem;
        line-height: 1.45;
    }

    .form-group {
        margin-bottom: 0.6rem;
    }

    #skylineForm label {
        font-size: 0.7rem; 
    }
    #skylineForm select {
        font-size: 0.75rem;
        padding: 0.35rem 0.4rem;
        height: 28px; 
        background-position: right 0.4rem center;
    }
    #skylineForm button[type="submit"] {
        font-size: 0.8rem;
        padding: 0.45rem 0.7rem;
        height: 30px;
    }

    .topnav ul {
      flex-direction: column;
      align-items: center;
    }
    .topnav li {
        width: 100%;
        text-align: center;
        margin-bottom: 0.1rem; 
    }
    .topnav a {
        display: block;
        padding: 0.35rem; 
        font-size: 0.8rem;
    }

    footer {
        padding: 0.7rem 0; 
    }
    footer p {
        font-size: 0.7rem; 
    }

    #skylineChart {
        margin: 1rem auto; 
    }
    #timing {
        font-size: 0.7rem; 
        padding: 0.35rem;
    }
}