/* HEADER */

header {
    position: relative;
    top: 0;
    z-index: 1000;
    background: rgba(0, 123, 255, 0.85);
    color: black;
    padding: 8px 40px;
    display: flex;
    align-items: center;
}

.header-center {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-icon {
    height: 80px;
    width: 80px;
}

.header-center h1 {
    margin: 0;
    font-size: 28px;
    white-space: nowrap;
}

.header-buttons {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

    .header-buttons button {
        padding: 5px 10px;
        font-size: 14px;
        border-radius: 4px;
        border: none;
        background-color: white;
        color: #007bff;
        cursor: pointer;
        transition: background-color 0.2s;
    }

        .header-buttons button:hover {
            background-color: #e6e6e6;
        }

.profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: default;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: background-color 0.2s, border-color 0.2s;
    text-align: center;
}

    .profile-button:hover {
        background-color: #f7f7f7;
        border-color: #ccc;
    }

.profile-icon {
    font-size: 16px;
    line-height: 1;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-button {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: background-color 0.2s, border-color 0.2s;
}

    .nav-button:hover {
        background-color: #f7f7f7;
        border-color: #ccc;
    }

.logout-button {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

    .logout-button:hover {
        background-color: #f1b0b7;
        border-color: #f1b0b7;
    }

.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

    .mobile-nav .nav-item {
        background: none;
        border: none;
        font-size: 22px;
        cursor: pointer;
        flex: 1;
        text-align: center;
        color: #333;
        transition: background-color 0.2s;
    }

        .mobile-nav .nav-item:hover {
            background-color: #f0f0f0;
        }

@media (min-width: 601px) {
    .mobile-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #2196f3;
        padding: 10px 0;
        z-index: 1000;
    }
}

@media (min-width: 1p){
    header {
        flex-direction: column;
        align-items: center;
    }

    .header-center {
        position: static;
        transform: none;
        margin-bottom: 10px;
    }

    .header-buttons {
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* MODAL */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    gap: 0px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-sizing: border-box;
    margin: 0 auto;
}

.modal-content h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.8rem;
    color: #333;
}

.close-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-button:hover {
    color: #007bff;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.9);
}

.modal-content button:hover {
    background-color: #0056b3;
}

.or-divider {
    text-align: center;
    font-weight: bold;
    margin: 5px 0;
}

.oauth-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0px;
    width: 100%;
    padding: 10px 16px;
    margin: 8px 0;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.oauth-icon {
    width: 20px;
    height: 20px;
}

.oauth-button.google {
    background-color: white;
    color: #444;
    border: 1px solid #ccc;
}

.oauth-button.google:hover {
    background-color: #f5f5f5;
}

.oauth-button.apple {
    background-color: black;
    color: white;
}

.oauth-button.apple:hover {
    background-color: #333;
}

.hidden {
    display: none;
}

.password-requirements {
    font-size: 14px;
    color: #555;
    margin: 5px 0 10px 0;
    text-align: center;
    line-height: 1.4;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

/* ... rest of your CSS remains untouched ... */

.hidden {
    display: none;
}


/* MAIN CONTENT */

body, html {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1470&q=80') no-repeat center center fixed;
    background-size: cover;
}

.container {
    background: rgba(255,255,255,0.0);
    max-width: 900px;
    margin: 30px auto;
    padding: 20px 30px;
    border-radius: 16px;
    text-align: center;
}

    .container h2 {
        margin-top: 0;
        margin-bottom: 20px;
        font-size: 2rem;
    }

input, select, button {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    margin: 10px auto;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
}

/* Address Container and Inputs */
#addressContainer {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.address-input {
    width: 350px;
    max-width: 400px;
    padding: 12px;
    margin: 10px auto;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
}

/* Add and Remove buttons */
.address-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

    .address-buttons button {
        width: 140px;
        padding: 10px;
        font-size: 14px;
        margin: 5px auto;
        box-sizing: border-box;
    }

/* Radius and Activity Group */
.radius-activity-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.radius-group {
    width: 100%;
    max-width: 300px;
    text-align: center;
}

    .radius-group label {
        display: block;
        font-weight: bold;
        margin-bottom: 8px;
        text-align: center;
    }

#radiusInput {
    text-align: center;
    width: 100%;
    max-width: 300px;
    padding: 12px;
    margin: 10px auto;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
}

#activityType {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.8);
    box-sizing: border-box;
    text-align-last: center;
}

/* Find Halfway Button */
#findHalfwayButton {
    padding: 12px 20px;
    margin: 20px auto;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
}

    #findHalfwayButton:hover {
        background-color: #0056b3;
    }

/* Map and Results */
#map {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    box-sizing: border-box;
    margin-top: 20px;
}

#results {
    background: transparent;
    padding: 0;
    margin-top: 20px;
}

/* Individual Recommendation Boxes */
.result {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    gap: 20px;
    flex-wrap: wrap;
}

.result:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    background: rgba(255, 255, 255, 0.98);
}

.result .info {
  flex: 1 1 250px;
  text-align: left;
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

.result .info strong {
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

.result .info a {
  color: #007bff;
  text-decoration: none;
  font-size: 16px;
}

.result .info a:hover {
  text-decoration: underline;
}


.result img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-left: 15px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}


/* Info Box for Empty Results */
.info-box {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 0;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    text-align: center;
    line-height: 1.6;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
}

/* Responsive Adjustments */
@media (max-width: 1000px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 10px 16px;
    }

    .header-center {
        margin-bottom: 10px;
        position: static;
        transform: none;
    }

    .header-buttons {
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
    }

    .address-buttons {
        flex-direction: column;
    }

    .radius-activity-group {
        flex-direction: column;
    }

    .address-input {
        width: 90%;
        max-width: 400px;
    }

    .address-buttons button,
    #findHalfwayButton {
        width: 90%;
        max-width: 300px;
    }

    #map {
        height: 400px;
    }

    .result .drive-line {
        display: block;
        margin: 0;
        padding: 0;
        line-height: 1.4;
    }

        .result .drive-line span {
            display: inline;
            margin: 0;
            padding: 0;
        }


    #auth-buttons {
        display: flex;
    }

    #user-info,
    #mobile-nav {
        display: none;
    }

    header button {
        width: 140px;
        padding: 10px 0;
        font-size: 16px;
        height: 40px;
        border: none;
        border-radius: 5px;
        background-color: #ffffff;
        color: #2196f3;
        cursor: pointer;
        transition: background-color 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

        header button:hover {
            background-color: #e0e0e0;
        }

    header button {
        width: 140px;
    }

    header {
        z-index: 2000;
        position: relative;
    }
.auth-error {
    background-color: #ffe0e0;
    color: #b00020;
    padding: 10px 15px;
    margin-top: 12px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ccc;
  z-index: 999;
}
.bottom-nav .nav-link {
  text-align: center;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}
.bottom-nav .nav-link:hover {
  color: #000;
}


.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background-color: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ccc;
  z-index: 999;
  font-size: 12px;
}
.bottom-nav .nav-link {
  flex: 1;
  text-align: center;
  color: #333;
  text-decoration: none;
  padding: 5px 0;
}
.bottom-nav .nav-link:hover {
  color: #000;
}


.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background-color: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ccc;
  z-index: 999;
  font-size: 12px;
  padding: 5px 0;
}
.bottom-nav .nav-link {
  flex: 1;
  text-align: center;
  color: #333;
  text-decoration: none;
  line-height: 1.2;
}
.bottom-nav .nav-link .label {
  display: block;
  font-size: 10px;
}
.bottom-nav .nav-link:hover {
  color: #000;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background-color: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 1px solid #ccc;
  z-index: 999;
  font-size: 12px;
  padding: 5px 0;
}
.bottom-nav .nav-link {
  flex: 1;
  text-align: center;
  color: #333;
  text-decoration: none;
  line-height: 1.2;
}
.bottom-nav .nav-link:hover {
  color: #000;
}
.image-fav-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.fav-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #ff4b5c;
  transition: transform 0.2s;
}

.fav-button:hover {
  transform: scale(1.2);
}

.fav-button:disabled {
  color: #999;
  cursor: default;
  transform: none;
}

#map {
  height: 400px;
  width: 100%;
  margin-top: 20px;
}
.result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.9);
  border-radius: 20px;
  margin: 20px 0;
  padding: 24px;
  box-shadow: 0 4px 16px #0001;
  min-height: 140px;
  position: relative;
}

.result .info {
  flex: 1;
  font-size: 1.07em;
}

.result .right-box {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 130px;
}

.result .place-photo {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
  background: #eee;
  box-shadow: 0 2px 6px #0002;
}

.fav-button {
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
  transition: transform 0.15s;
  font-size: 2.3em;
  margin: 0 0 0 10px;
  color: #e25555;
}
.fav-button:hover {
  transform: scale(1.12);
}
.result .right-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 140px;
    max-width: 140px;
}

.result .place-photo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 6px #0002;
    margin-bottom: 8px;
}

.fav-label {
    font-size: 1em;
    color: #666;
    margin-bottom: 4px;
    text-align: center;
}

.fav-button {
    background: none;
    border: none;
    font-size: 2.3em;
    cursor: pointer;
    color: #bbb;
    transition: color 0.18s, transform 0.12s;
    margin: 0;
    padding: 0;
    outline: none;
}
.fav-button.added,
.fav-button.filled {
    color: #e25555;
}
.fav-button:active {
    transform: scale(1.12);
}
.history-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    padding: 20px;
}

.history-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.history-card:hover {
    background-color: #e6f7ff;
}

.history-card-content {
    margin-bottom: 15px;
}

.recall-button {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.recall-button:hover {
    background-color: #0056b3;
}
