@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&display=swap');

:root {
    --background-color: #ffffff;
    --surface-color: #f0f0f0;
    --primary-text-color: #000000;
    --secondary-text-color: #555555;
    --accent-color: #000000;
    --accent-color-hover: #333333;
    --border-color: #dddddd;
}

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

body {
    font-family: 'IBM Plex Sans KR', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--primary-text-color);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Header and Navigation */
.top-nav {
    background-color: #141414; /* Darker background */
    border-bottom: 1px solid #333; /* Darker border */
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1; /* Adjust line-height for image alignment */
}

.logo-image {
    height: 50px; /* Set a fixed height for the logo */
    width: auto;
    vertical-align: middle; /* Align image vertically */
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: #888888; /* Gray for non-active links */
    transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #FFFFFF; /* White for active/hover links */
}

.hamburger-menu {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--primary-text-color);
    cursor: pointer;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* 간격 추가 */
}

.cart-icon {
    position: relative;
    color: #ffffff;
    display: flex;
    align-items: center;
}


#auth-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-display-name {
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap; /* Prevent text from wrapping */
    writing-mode: horizontal-tb; /* Ensure horizontal display */
}

#auth-container .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

#login-btn {
    background-color: #ffffff;
    color: var(--primary-text-color);
    border: 1px solid var(--border-color);
}

#login-btn:hover {
    background-color: var(--surface-color);
    color: var(--primary-text-color);
}


/* Main Content */
main h1 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px; /* Adjusted height for PC */
    overflow: hidden;
}

.hero-slider .slides {
    display: flex;
    width: 100%;
    height: 100%;
}

.hero-slider .slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    background-size: contain; /* Ensure entire image is visible */
    background-repeat: no-repeat;
    background-color: #1a1a1a; /* Dark background for empty space */
    background-position: center;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-slider .slide.active {
    opacity: 1;
    position: relative;
}



.hero-slider .hero-content {
    display: none; /* Hide text content */
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-slider .hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-slider .hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-slider .btn {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    border-radius: 30px;
    text-transform: uppercase;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease-out;
}

.hero-slider .btn:hover {
    background-color: var(--accent-color-hover);
    transform: translateY(-5px);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dots .dot.active {
    background-color: #ffffff;
}
/* Product List */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.product-image-container {
    position: relative;
    height: 280px;
    overflow: hidden; /* Hide images outside the container */
}

.image-slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out; /* Animation for the slide */
}

.product-image {
    width: 100%; /* 컨테이너 너비에 맞춤 */
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.product-actions .btn {
    width: auto;
    flex-grow: 1;
    padding: 0.75rem;
    font-size: 0.9rem;
    border-radius: 20px;
}

.product-actions .buy-now-btn {
    background-color: var(--accent-color);
    color: #ffffff;
}

.product-actions .add-to-cart-btn {
    background-color: #555;
    color: #ffffff;
}

/* Cart Modal */
.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.cart-modal {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.cart-modal h2 {
    margin-top: 0;
    text-align: center;
}

#cart-items {
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 1rem;
}

.cart-item-info {
    flex-grow: 1;
}

.remove-from-cart-btn {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-total {
    text-align: right;
    font-size: 1.2rem;
    margin: 1rem 0;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease-out;
    width: 100%;
    text-align: center;
}

.btn.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.btn:hover {
    background-color: var(--accent-color-hover);
    transform: translateY(-3px);
}

.btn.btn-secondary {
    background-color: #555;
    margin-top: 0.5rem;
}
.btn.btn-secondary:hover {
    background-color: #444;
}


#admin-button {
    display: none;
}

.footer {
    background-color: #f8f9fa;
    padding: 2rem 1rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

/* Cart Page Specifics */
.cart-page-container {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.cart-page-container .cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-page-container .cart-item:last-child {
    border-bottom: none;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.quantity-btn {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.cart-summary .cart-total {
    font-size: 1.5rem;
}

.cart-summary .btn {
    width: auto;
    padding: 1rem 2.5rem;
}

#cart-empty-message {
    text-align: center;
    font-size: 1.2rem;
    padding: 3rem 0;
    color: var(--secondary-text-color);
}


/* Mobile Bottom Navigation */
.bottom-nav-mobile {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #141414;
    border-top: 1px solid #333;
    z-index: 1000;
    padding: 0.5rem 0;
}

.bottom-nav-mobile .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #888888; /* Inactive color */
    text-decoration: none;
    transition: color 0.2s ease;
}

.bottom-nav-mobile .nav-item.active {
    color: #FFFFFF; /* Active color */
}

.bottom-nav-mobile .nav-label {
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Mobile Header (Logo + Search) */
.mobile-header {
    display: none; /* Hidden by default */
    background-color: #141414;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid #333;
}

.mobile-header .logo-mobile-header {
    display: block;
    margin-bottom: 1rem;
}

.mobile-header .search-bar-mobile {
    padding: 0 1rem;
}

/* PC Search Bar */
.search-bar-pc {
    display: block; /* Visible by default on PC */
    background-color: #141414;
    padding: 1rem 0;
    border-bottom: 1px solid #333;
}

.search-bar-pc .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.search-input {
    width: 100%;
    padding: 0.8rem 3rem 0.8rem 1rem; /* Adjusted padding for icon */
    border: 1px solid #555;
    border-radius: 25px;
    background-color: #222;
    color: #eee;
    font-size: 1rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper .search-input {
    padding-right: 3rem; /* Ensure space for the icon */
}

.search-input-wrapper .search-icon {
    position: absolute;
    right: 1rem;
    color: #aaa;
    cursor: pointer;
    font-size: 1.5rem;
}

.search-input::placeholder {
    color: #aaa;
}

/* Mobile Cart Header */
.mobile-cart-header {
    display: none; /* Hidden by default */
    background-color: #141414;
    padding: 1rem;
    border-bottom: 1px solid #333;
    align-items: center;
    color: #FFFFFF;
    position: sticky;
    top: 0;
    z-index: 999;
}

.mobile-cart-header .back-button {
    display: flex;
    align-items: center;
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 500;
}

.mobile-cart-header .back-button .material-symbols-outlined {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .top-nav {
        display: none; /* Hide top nav on mobile */
    }

    .search-bar-pc {
        display: none; /* Hide PC search bar on mobile */
    }

    .mobile-header {
        display: block; /* Show mobile header on mobile */
    }

    /* Hide generic mobile header on cart page */
    body.cart-page .mobile-header {
        display: none;
    }

    /* Show cart-specific mobile header on cart page */
    body.cart-page .mobile-cart-header {
        display: flex;
    }

    /* Hide generic mobile header on mypage page */
    body.mypage-page .mobile-header {
        display: none;
    }

    /* Show mypage-specific mobile header on mypage page */
    body.mypage-page .mobile-cart-header {
        display: flex;
    }

    .bottom-nav-mobile {
        display: flex; /* Show bottom nav on mobile */
    }

    main {
        /* Add padding to the bottom to prevent content from being hidden by the nav bar */
        padding-bottom: 80px; 
    }

    .hamburger-menu {
        display: block;
    }

    /* General Mobile Adjustments */
    h1 {
        font-size: 1.8rem; /* Further reduce main headings */
        margin-bottom: 1.5rem;
    }

    h2 {
        font-size: 1.3rem; /* Further reduce sub-headings */
        margin-bottom: 1.2rem;
    }

    .container {
        padding: 1.5rem 0.8rem; /* Reduce container padding */
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .cart-summary .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .cart-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .cart-summary .btn {
        width: 100%;
    }

    /* Hero Slider Mobile Adjustments */
    .hero-slider {
        height: 250px; /* Smaller height for mobile, adjusted for aspect ratio */
    }

    .hero-slider .hero-title {
        font-size: 2rem;
    }

    .hero-slider .hero-subtitle {
        font-size: 1rem;
    }

    .hero-slider .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Mobile Product List: 2 columns, square-like */
    .product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem; /* Further reduce spacing between items */
    }

    .product-card {
        background-color: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        text-align: center; /* Center product info */
    }

    .product-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Make image container a square */
    .product-image-container {
        position: relative;
        height: auto;
        aspect-ratio: 1 / 1; /* Modern way to create a square */
        background-color: #f0f0f0;
        border-radius: 8px; /* Rounded corners for the image area */
        overflow: hidden;
    }

    .product-image {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Fill the square, crop if needed */
    }

    .product-info {
        padding: 0.75rem 0;
    }

    .product-name {
        font-size: 0.85rem;
        margin-bottom: 0.15rem;
    }

    .product-price {
        font-size: 0.75rem;
    }

    /* Hide hover actions on mobile */
    .product-actions {
        display: none;
    }

    /* Mobile Product Detail Page Adjustments */
    .product-main-section {
        flex-direction: column;
    }
    .product-detail-image {
        max-width: 100%;
    }

    .product-title {
        font-size: 1.8rem;
    }

    .product-detail-info .product-price {
        font-size: 1.4rem;
    }

    .option-group label {
        font-size: 0.9rem;
    }

    .select-wrapper select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .product-actions-group {
        max-width: 100%; /* Allow buttons to take full width */
    }

    .product-actions-group .btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .product-full-description {
        font-size: 0.9rem;
        padding-top: 1.5rem;
    }

    .payment-container {
        flex-direction: column;
    }

    .cart-page-container .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "image info"
            "image quantity"
            "image remove";
        gap: 0.5rem 1rem;
        padding: 1rem 0;
    }

    .cart-page-container .cart-item-image {
        grid-area: image;
        width: 80px;
        height: 80px;
    }

    .cart-page-container .cart-item-info {
        grid-area: info;
    }

    .cart-page-container .cart-item-quantity {
        grid-area: quantity;
        justify-self: start;
    }

    .cart-page-container .remove-from-cart-btn {
        grid-area: remove;
        justify-self: start;
        padding: 0;
        font-size: 1.2rem;
    }
}

/* Product Detail Page (PC) */
.product-detail-container {
    display: flex;
    flex-direction: column; /* Stack main section and description vertically */
    gap: 3rem;
    margin-top: 2rem;
}

.product-main-section {
    display: flex;
    gap: 3rem;
}

.product-detail-image {
    flex: 1;
    max-width: 50%;
}

#main-product-image {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.product-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
}

.product-detail-info .product-price {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.product-options {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper::after {
    content: '▼';
    font-size: 1rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--secondary-text-color);
}

.select-wrapper select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.product-actions-group {
    display: flex;
    gap: 1rem; /* Space between the buttons */
    width: 100%;
    max-width: 400px;
    margin-bottom: 2rem;
}

.product-actions-group .btn {
    flex: 1; /* Each button takes up equal space */
    padding: 1rem;
    font-size: 1rem; /* Slightly smaller font for smaller buttons */
}

.product-detail-info .buy-now-btn {
    background-color: var(--accent-color);
    color: #ffffff;
}

.product-detail-info .buy-now-btn:hover {
    background-color: var(--accent-color-hover);
}

.product-detail-info .add-to-cart-btn {
    background-color: #555;
    color: #ffffff;
}

.product-detail-info .add-to-cart-btn:hover {
    background-color: #444;
}

.product-full-description {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    line-height: 1.8;
    width: 100%;
}

/* Payment Page */
.payment-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.payment-form {
    flex: 2;
}

.order-summary {
    flex: 1;
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
}

.order-summary h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.order-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 1.2rem;
    text-align: right;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.form-group-row {
    display: flex;
    gap: 1rem;
}

.form-group-row .form-group {
    flex: 1;
}

/* My Page - Order History */
#order-history-container h2 {
    text-align: center;
    margin-bottom: 2rem;
}

#order-list .order-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

#order-list .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

#order-list .order-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

#order-list .order-body ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
}

#order-list .order-body li {
    margin-bottom: 0.5rem;
}


/* admin.html - Order Management Styles */
.order-card {
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.order-body ul {
    list-style-type: disc;
    padding-left: 20px;
}

.order-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-actions select {
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.update-status-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.update-status-btn:hover {
    background-color: var(--accent-color-hover);
}

/* Admin Page: Size and Price Input Layout */
.size-option {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.size-option input {
    flex: 1;
}

.size-option .remove-option-btn {
    flex-shrink: 0;
    background: #eee;
    border: 1px solid #ccc;
    color: #333;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 5px;
}

/* Product Detail Page Warning Message */
.warning-message {
    background-color: #ffebee; /* Light red background */
    color: #c62828; /* Darker red text */
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ef9a9a;
}

/* Auth Pages (Login/Signup) */
main .auth-container {
    max-width: 550px; /* Adjusted width */
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

main .auth-container h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-text-color);
}

.auth-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; /* Add some gap between form groups */
}

.auth-form .form-group {
    flex: 1 1 100%; /* Make form groups take full width by default */
    margin-bottom: 0; /* Remove default margin-bottom as gap handles spacing */
    text-align: left;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-text-color);
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--background-color);
    color: var(--primary-text-color);
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.2);
}

.auth-form .btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
}

.auth-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--accent-color);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--secondary-text-color);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.btn-google:hover {
    background-color: var(--surface-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google img {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
}

.error-message {
    background-color: #ffebee; /* Light red background */
    color: #c62828; /* Darker red text */
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ef9a9a;
    text-align: left;
}

.error-message.hidden {
    display: none;
}

.error-message.active {
    display: block;
}

.hint {
    font-size: 0.85rem;
    color: var(--secondary-text-color);
    margin-top: 0.5rem;
    text-align: left;
}

@media screen and (max-width: 768px) {
    main .auth-container {
        margin: 1rem auto;
        padding: 1.5rem;
        box-shadow: none;
        border-radius: 0;
    }

    main .auth-container h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .auth-form .btn,
    .btn-google {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    .divider {
        margin: 1.5rem 0;
    }
}

/* Auth Page Body Styling */
.auth-page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    background-color: var(--background-color);
}

.auth-page-body.dark-mode {
    --background-color: #1a1a1a;
    --surface-color: #2c2c2c;
    --primary-text-color: #ffffff;
    --secondary-text-color: #bbbbbb;
    --border-color: #444444;
    --accent-color: #4a90e2;
    --accent-color-hover: #6aafff;
}

.auth-page-body main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.auth-logo {
    display: block;
    margin-bottom: 1.5rem;
    text-align: center;
}

    .auth-logo .logo-image {
        height: 60px;
        width: auto;
    }

    .dark-mode-toggle-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: var(--secondary-text-color);
        cursor: pointer;
        font-size: 1.5rem;
        padding: 0.5rem;
        border-radius: 50%;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .dark-mode-toggle-btn:hover {
        background-color: rgba(0, 0, 0, 0.1);
        color: var(--primary-text-color);
    }

    .auth-page-body.dark-mode .dark-mode-toggle-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--primary-text-color);
    }
/* Auth Container Width Adjustment */
main .auth-container {
    max-width: 500px;
    width: 95%;
    margin: 4rem auto;
    padding: 2rem;
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 1.5em; /* Increased size */
    height: 1.5em; /* Increased size */
    border: 3px solid rgba(255, 255, 255, 0.3); /* Adjusted border for larger size */
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 0.5em;
}

@keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* New Footer Styles */
.footer {
    background-color: #141414;
    color: #ffffff;
    padding: 3rem 2rem;
    font-size: 0.9rem;
    border-top: 1px solid #333;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: #888888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.company-info {
    text-align: center;
    line-height: 1.6;
    color: #888888;
}

.company-info p {
    margin: 0;
}

/* Policy Page Styles */
.policy-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.policy-nav .policy-btn {
    background-color: var(--surface-color);
    color: var(--primary-text-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.policy-nav .policy-btn.active,
.policy-nav .policy-btn:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.policy-content {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    line-height: 1.8;
    color: var(--secondary-text-color);
}

.policy-content h1, .policy-content h2, .policy-content h3 {
    color: var(--primary-text-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.policy-content h1 {
    font-size: 2.2rem;
}

.policy-content h2 {
    font-size: 1.8rem;
}

.policy-content h3 {
    font-size: 1.4rem;
}

.policy-content p {
    margin-bottom: 1rem;
}

.policy-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-content ol {
    list-style-type: decimal;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-content strong {
    font-weight: 700;
    color: var(--primary-text-color);
}

.policy-content em {
    font-style: italic;
}

.policy-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

@media screen and (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .policy-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .policy-nav .policy-btn {
        width: 100%;
    }

    .policy-content {
        padding: 1rem;
    }

    .policy-content h1 {
        font-size: 1.8rem;
    }

    .policy-content h2 {
        font-size: 1.5rem;
    }

    .policy-content h3 {
        font-size: 1.2rem;
    }
}
