/* --- Global Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fcfcfc;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- Navigation --- */
nav {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

nav a {
    margin-right: 15px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover { color: #000; }

/* --- Buttons & Auth UI --- */
button {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover { background: #333; }

button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Ensure the hover effect doesn't trigger on disabled buttons */
button:disabled:hover {
    background-color: #ccc !important;
}

#sign-out-btn, #sign-in-btn {
    padding: 4px 12px;
    font-size: 12px;
    width: auto;
    margin-left: auto;
    background: #fcfcfc;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#sign-out-btn:hover, #sign-in-btn:hover { background: #f0f0f0; }

.card-button {
    font-size: 16px;
    margin-top: auto;
    opacity: 0.65;
}

/* --- Cards & Pricing --- */
.card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pricing-page .pricing-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
}

.pricing-page .card {
    width: 320px;
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-page .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.15);
}

.subtext { font-size: 0.9em; color: #666; margin-bottom: 20px; margin-top: -15px; }

/* --- Features List (Centered) --- */
.features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    font-size: 0.95em;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers items horizontally */
}

.features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center; /* Centers content within the list item */
}

/* --- User Profile & Dropdown --- */
.user-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    margin: 20px 0;
}

.profile-icon { width: 24px; height: 24px; border-radius: 50%; }

.dropdown-container {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
    z-index: 100;
}

.dropdown-trigger {
    padding: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative; /* Required for the triangle positioning */
    justify-content: space-between; /* Pushes content left, triangle right */
}

.dropdown-trigger::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666; /* The color of the arrow */
    margin-left: 10px;
    transition: transform 0.2s; /* Optional: adds a smooth rotation */
}

/* Optional: Rotate triangle when dropdown is active */
.dropdown-container.open .dropdown-trigger::after {
    transform: rotate(90deg);
}

.dropdown-list { border-top: 1px solid #ddd; position: absolute; top: 100%; left: 0; width: 100%; background: #fff; max-height: 200px; overflow-y: auto; z-index: 999; }
.dropdown-item { padding: 10px 12px; cursor: pointer; display: flex; align-items: center; }
.dropdown-item:hover { background: #eee; }
.server-icon { width: 35px; height: 32px; border-radius: 50%; margin-right: 10px; }

/* --- Conditional Visibility States --- */
.user-profile, .dropdown-container, #sign-out-btn { display: none; }
.is-logged-in .user-profile { display: flex; }
.is-logged-in .dropdown-container { display: block; }
.is-logged-in #sign-out-btn { display: inline-block; }

.auth-notice { display: block; }
.is-logged-in .auth-notice { display: none; }

#sign-in-btn { display: inline-block; }
.is-logged-in #sign-in-btn { display: none; }

.is-logged-in .card-button { opacity: 1; }