:root {
    --bg-colour: white;
    --text-colour: black;
    --accent-colour: #4a90e2;
    --hover-colour: #357abd;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    background-color: var(--bg-colour);
    color: var(--text-colour);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Navigation Bar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    padding-left: 1.25rem;
    background: var(--bg-colour);
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-colour);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-colour);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--accent-colour);
    background: rgba(74, 144, 226, 0.1);
}

.nav-links a:hover::after {
    width: 80%;
}

.logo {
    background: none;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-logo {
    height: 50px;
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: rotate(20deg);
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-colour);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 120px;
}

.theme-dropdown.show {
    display: flex;
}

.theme-dropdown a {
    text-decoration: none;
    color: var(--text-colour);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-dropdown a:hover {
    background: var(--accent-colour);
    color: var(--bg-color);
}

header, footer {
    padding: 2rem;
    text-align: center;
    width: 100%;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 80px auto 2rem;
    padding: 3rem;
    background: var(--bg-colour);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.container:hover {
    box-shadow: var(--shadow-hover);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-colour), var(--hover-colour));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.8;
}

.btn {
    background-color: var(--accent-colour);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.btn:hover {
    background-color: var(--hover-colour);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(0);
}


.small-btn {
    background-color: var(--accent-colour);
    color: white;
    border: none;
    padding: 0.50rem 0.75rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-decoration: none;
    margin-top: 0.7rem;
}

.small-btn:hover {
    background-color: var(--hover-colour);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

.small-btn:active {
    transform: translateY(0);
}



.small-btn-red {
    background-color: var(--warning-colour);
    color: white;
    border: none;
    padding: 0.50rem 0.75rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-decoration: none;
    margin-top: 0.7rem;
}

.small-btn-red:hover {
    background-color: var(--warning-hover);
    transform: translateY(-1px);
    box-shadow: var(--warning-colour);
}

.small-btn-red:active {
    transform: translateY(0);
}


.btn-red {
    background-color: var(--warning-colour);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-decoration: none;
}

.btn-red:hover {
    background-color: var(--warning-hover);
    transform: translateY(-2px);
    box-shadow: var(--warning-colour);
}

.btn-red:active {
    transform: translateY(0);
}

.dashboard-plan-saved {
    margin-top: 0.8rem;
}

.dashboard-plan-saved a {
    text-decoration: none;
    color: var(--text-colour);
}
.dashboard-plan-saved a:active {
    text-decoration: none;
    color: var(--text-colour)
}

.hero-section {
    height: 100vh;
    text-align: center;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(53, 122, 189, 0.05));
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.hero-section h1 {
    margin-bottom: 1.5rem;
}

.hero-section p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.illustration {
    max-width: 100%;
    height: auto;
    padding-top: 8rem;
}

tagline {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-colour);
    margin-bottom: 1rem;
    display: block;
}

/* Planner Section */


.planner-holder {
    display: flex;
    justify-content: center;
    padding-top: 120px;
    padding-bottom: 200px;
    flex: 1;
}

.planner-section {
    position: absolute;
    max-width: 1600px;
    width: 90%;
    padding: 2rem;
    padding-bottom: 150px;
    background: var(--bg-colour);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    transition: box-shadow 0.3s ease;
    height: auto;
    overflow: auto;
    margin: 0 auto;
}

.logout-btn {
    margin-top: 2rem;
}

.delete-account-form {
    margin-top: 1.5rem;
}

.delete-account-form input, .delete-planner-form select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    margin-bottom: 1.5rem;
}

.planner-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.planner-form label {
    font-weight: 600;
    margin-bottom: -1rem;
}
.planner-form input, .planner-form select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}


.update-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.update-form .btn {
    padding: 0.6rem 1.0rem;
    overflow-y: auto;

}


.small-carbon {
    font-size: 0.7rem;
}

.results-section {
    position: relative;
    margin: 100px auto 2rem;
    max-width: 1600px;
    width: 90%;
    padding: 2rem;
    padding-bottom: 5rem;
    background: var(--bg-colour);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    height: auto;
    transition: box-shadow 0.3s ease;
    overflow-y: auto; 
}

.route-results {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    background: var(--bg-accent);
    max-height: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;

}
.route-results p {
    margin-bottom: -0.4rem;
}
.route-details p, .route-summary p {
    text-align: left;
}    


.route-holder { 
    margin-top: 2rem; 
    padding: 1rem; 
    display: flex; 
    flex-direction: column; 
    border-radius: var(--border-radius); 
    background: var(--bg-accent); 
    overflow-y: auto; 
    gap: 1rem; 
    padding-bottom: 5rem; }

#back-button {
    padding: 1rem;
    margin: 0 auto;
    margin-top: 1.5rem;
    position: sticky;
    bottom: 1rem;
    display: block;
}

.progress-message {
    font-size: 1rem;
    color: var(--text-colour);
    margin-top: 1rem;
    padding-top: 1rem;
    text-align: center;
}

.route-card {
    flex: 0.2;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-colour);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    transition: flex 0.5s ease-in-out;
    cursor: pointer;
    padding: 2rem;
    overflow-y: auto;
    transition: box-shadow 0.2s ease;
    margin-bottom: 1rem;
}

.route-card:hover {
    box-shadow: var(--shadow-hover);
}
.route-summary p {
    margin: 4px 0;
}

.route-details {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease-out, padding 0.15s ease;
}

.route-card.expanded .route-details {
    padding-top: 10px;
    max-height: none;
}

.route-card p {
    margin-bottom: -0.4rem;
}

.route-card :active {
    flex: 3;
}

.saved-route-card {
    flex: 0.2;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-colour);
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    cursor: pointer;
    padding: 1cm;
    overflow-y: auto;
    transition: box-shadow 0.2s ease;
    margin-bottom: 0.5rem;
    text-align: left;
    margin-right: 1rem;
}
.saved-route-card p {
    margin-bottom: -0.4rem;
    text-align: left;
}
.saved-route-card .small-btn .small-btn-red {
    margin-top: 0.7rem;
}

/* Login Section */
.login-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    background: var(--bg-colour);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    transition: box-shadow 0.3s ease;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form label {
    font-weight: 600;
    margin-bottom: -1rem;
}
.login-form input {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.login-form input:focus {
    border-color: var(--accent-colour);
    outline: none;
}

.login-error-message {
    color: red;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
}
.login-new-message {
    color: green;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
}

.verification-banner {
    background-color: #ffc1c1;
    border: 1px solid #ff4d4d;
    color: var(--accent-colour);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.9rem;
    /* push banner below the fixed header */
    margin: 80px 0 1.5rem;
}
.verification-banner a {
    color: var(--accent-colour);
    text-decoration: none;
    font-weight: 600;
}
.verification-banner a:hover {
    text-decoration: underline;
}

#centre-button {
    display: block;
    margin: 2rem auto 0;
}
.extras {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    padding-top: 2rem;
}
.extras p {
    font-size: 0.9rem;
}
.extras a {
    text-decoration: none;
    color: var(--accent-colour);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.extras a:hover {
    color: var(--hover-colour);
}

.dashboard-section {
    margin: 100px auto 2rem;
    max-width: 1200px;
    width: 90%;
    padding: 2rem;
    background: var(--bg-colour);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    height: auto;
    transition: box-shadow 0.3s ease;
    overflow-y: auto; 
}

.dashboard-saved-routes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-account-settings {
    margin-top: 2rem;
    text-align: left;
}

.dashboard-account-settings p {
    margin-bottom: 0.5rem;
    text-align: left;
}
.dashboard-account-settings a {
    color: var(--accent-colour);
    text-decoration: none;
    font-weight: 600;
}

.dashboard-error-message {
    color: red;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
}
.dashboard-success-message {
    color: green;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
}

.success-message {
    color: green;
    font-size: 1.5rem;
    text-align: center;
    margin-top: 2rem;
}

.new-route {
    color: var(--accent-colour);
    font-size: 0.9rem;
    text-align: center;
    margin-top: -1.5rem;
    margin-bottom: -0.7rem;
}

.column {
  float: left;
  width: 50%;
}


.row:after {
  content: "";
  display: table;
  clear: both;
}

.footer {
    background: var(--bg-colour);
    text-align: center;
    padding: 1rem 2rem;
    margin-top: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    flex-direction: column;
    overflow: auto;
}
.copyright {
    font-size: 0.8rem;
    color: var(--text-colour);
    opacity: 0.6;
    margin-top: 0.5rem;
}

.lost-section { 
    color: var(--text-colour);
    position: fixed;
    text-align: center;
    margin-top: auto;
    padding: 300px;
}


@media (max-width: 768px) {
    nav {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        padding: 0.25rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .container {
        margin-top: 70px;
        padding: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
}

