:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --dark-color: #2d3436;
    --light-color: #f9f9f9;
    --accent-color: #ff9800;
}

@font-face {
    font-family: "HamburgSymbols";
    src: url("/fonts/HamburgSymbols.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

/* Font KR Astro 1 */
@font-face {
    font-family: "KR Astro 1";
    src: url("/fonts/KR Astro 1.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* Font KR Astro 2 */
@font-face {
    font-family: "KR Astro 2";
    src: url("/fonts/KR Astro 2.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* Font KR Astro 3 */
@font-face {
    font-family: "KR Astro 3";
    src: url("/fonts/KR Astro 3.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "Astronomicon";
    src: url("/fonts/Astronomicon.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* Áp dụng cho toàn trang */
body {
    font-family: Segoe UI, Segoe UI Variable Text, -apple-system,
        BlinkMacSystemFont, Helvetica Neue, Helvetica, Arial, sans-serif,
        "HamburgSymbols", "KR Astro 1", "KR Astro 2", "KR Astro 3", "Astronomicon";
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    font-size: 0.90625rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1.333;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.428;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5;
}

.astrology-form {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
}

.form-title {
    color: #6f42c1;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.form-control,
.form-select {
    padding: 5px 5px;
    border-radius: 0px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.8);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 2px 0 0 0 rgba(156, 39, 176, 0.15) inset;
}

.submit-btn {
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border: none;
    padding: 10px 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
    color: white;
    cursor: pointer;
}

.submit-btn:hover {
    background: linear-gradient(
        45deg,
        var(--secondary-color),
        var(--primary-color)
    );
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
}

#map {
    border: 1px solid #ddd;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 400px;
}

.search-results-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    max-height: 80vh;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.address-suggestions {
    position: absolute;
    width: calc(44%);
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 2000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile-specific styles */
@media (max-width: 576px) {
    .astrology-form {
        padding: 15px;
        margin: 15px auto;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .form-control,
    .form-select {
        font-size: 0.875rem;
        padding: 8px;
    }

    .input-group-text {
        padding: 8px;
    }

    .submit-btn {
        width: 100%;
        padding: 12px;
        font-size: 0.875rem;
    }

    #latLongDisplay {
        font-size: 0.875rem;
    }

    #map {
        height: 200px !important; /* Reduced height for mobile */
    }

    .address-suggestions {
        width: 100%; /* Full width for mobile */
        max-height: 150px;
    }
    #searchAddress {
        font-size: 0.875rem;
    }
    .search-results-container {
        width: 90%;
        max-height: 70vh;
    }

    .form-check-inline {
        margin-right: 10px;
    }

    /* Ensure side-by-side fields are compact */
    .col-7 {
        padding-left: 8px;
        padding-right: 8px;
    }

    .col-5 {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Adjust gender radio buttons for mobile */
    .form-control:has(.form-check-inline) {
        display: flex;
        align-items: center;
        padding: 8px;
    }

    .form-check-label {
        font-size: 0.875rem;
    }
}

/* Tablet and larger screens */
@media (min-width: 577px) and (max-width: 768px) {
    .astrology-form {
        padding: 20px;
        margin: 20px auto;
    }

    .form-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Điều chỉnh layout cho mobile - giới tính 30%, ngày sinh 70% */
    .custom-box-full-name {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 1rem;
    }

    /* Phần ngày sinh giờ sinh chiếm 70% */
    .custom-box-date-time {
        flex: 0 0 70%;
        max-width: 70%;
        padding-right: 8px;
    }

    /* Phần giới tính chiếm 30% */
    .col-5.col-md-3.mb-3 {
        flex: 0 0 30%;
        max-width: 30%;
        padding-left: 0;
        margin-bottom: 1rem !important;
    }

    /* Điều chỉnh kích thước input ngày sinh */
    #birthDate {
        max-width: 50% !important;
    }

    #birthTime {
        max-width: 50% !important;
    }

    /* Căn chỉnh radio buttons */
    .form-check-inline {
        display: inline-flex;
        align-items: center;
        margin-right: 5px;
    }

    /* Đảm bảo form-control của giới tính không bị tràn */
    .col-5.col-md-3.mb-3 .form-control {
        justify-content: space-evenly;
    }
}
