:root {
    --dark-blue: #091747;
    --purple: #5850ec;
    --light-gray: #f4f5f7;
}

.header {
    background-color: white;
    border-bottom: 1px solid rgba(88, 80, 236, 0.2);
    position: relative;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 5%;
}

.logo-nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo img {
    width: 60px;
    height: 40px;
    border-radius: 0px;
    cursor: pointer;
    object-fit: cover;
    object-position: center;
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-tabs {
    display: flex;
    gap: 1.5rem;
}

.nav-tabs a {
    text-decoration: none;
    color: var(--dark-blue);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, background-color 0.3s ease;
    position: relative;
    cursor: pointer;
}

.nav-tabs a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--purple);
    transition: width 0.3s ease;
}

.nav-tabs a:hover::after {
    width: 100%;
}

.nav-tabs a.selected {
    color: var(--purple);
    cursor: default;
}

.nav-tabs a.selected::after {
    width: 100%;
}

.nav-tabs a.selected:hover::after {
    width: 100%;
}

.credits-settings-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.credits {
    font-weight: 600;
    color: var(--purple);
    padding: 0.5rem 1rem;
    background-color: var(--light-gray);
    border-radius: 20px;
    border: 1px solid rgba(88, 80, 236, 0.3);
}

.gear-icon-container {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gear-icon {
    cursor: pointer;
    width: 38px;  /* Increased by 6px */
    height: 38px; /* Increased by 6px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.gear-icon svg {
    transform: rotate(0deg); /* set initial state */
    width: 34px;
    height: 34px;
    fill: var(--dark-blue);
    opacity: 0.7;
    transition: transform 1s ease-in-out, fill 0.5s ease, opacity 0.5s ease;
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
}


.gear-icon:hover svg {
    opacity: 1;
    fill: var(--purple);
    transform: rotate(720deg);
}

.popup {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 120%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(88, 80, 236, 0.1);
    padding: 0.75rem;
    min-width: 220px;
    max-width: 260px;
    z-index: 1000;
    border: 1px solid rgba(88, 80, 236, 0.2);
}

.popup::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background-color: white;
    border-top: 1px solid rgba(88, 80, 236, 0.2);
    border-left: 1px solid rgba(88, 80, 236, 0.2);
}

/* Updated subscription container with centered content */
.popup-subscription {
    display: flex;
    flex-direction: row;
    justify-content: center; /* Center the content */
    align-items: center;
    font-size: 0.85rem;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--light-gray);
    background-color: rgba(88, 80, 236, 0.05);
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    text-align: center; /* Center text */
}

.popup-subscription .plan-label {
    font-weight: 500;
    color: var(--dark-blue);
    opacity: 0.7;
    white-space: nowrap;
    margin-right: 5px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.popup-subscription .plan-name {
    font-weight: 600;
    color: var(--purple);
    text-transform: capitalize;
    white-space: nowrap;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    overflow: hidden;
    flex-shrink: 0;
}

.popup-email {
    font-size: 0.8rem;
    color: var(--dark-blue);
    text-align: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--light-gray);
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.2;
    max-width: 100%;
    margin-top: 0.5rem;
}

.popup-separator {
    height: 1px;
    background-color: var(--light-gray);
    margin: 0.25rem 0;
    width: 100%;
}

.popup button {
    background: none;
    border: none;
    color: var(--dark-blue);
    cursor: pointer;
    padding: 0.5rem 1rem;
    width: 100%;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.25rem;
    border-radius: 6px;
}

.popup button:hover {
    background-color: var(--light-gray);
    color: var(--purple);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: var(--dark-blue);
    margin: 2px 0;
    transition: 0.4s;
}

@media (max-width: 768px) {
    .nav-container {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        width: 100%;
        background-color: white;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(88, 80, 236, 0.1);
        transition: left 0.3s ease;
        z-index: 1001;
    }

    .nav-container.active {
        left: 0;
    }

    .nav-tabs {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-tabs a {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 480px) {
    .popup {
        left: auto;
        right: 0;
        transform: none;
        min-width: 200px;
    }

    .popup::before {
        left: auto;
        right: 10px;
    }
    
    .popup-subscription .plan-name {
        font-size: 0.75rem;
    }
    
    .popup-subscription .plan-label {
        font-size: 0.75rem;
    }
}

@media (min-width: 769px) {
    .gear-icon-container {
        margin-right: 15px;
    }
}
