/* Header Action Buttons */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.submit-tool-btn,
.coffee-btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.submit-tool-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--primary-bg);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.submit-tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.4);
    color: var(--primary-bg);
}

.coffee-btn-header {
    background: linear-gradient(135deg, #FFDD57, #FF8177);
    color: #1a1f26;
    box-shadow: 0 4px 12px rgba(255, 221, 85, 0.3);
}

.coffee-btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 221, 85, 0.4);
    color: #1a1f26;
}

/* Auth Buttons (Login / Profile menu) */
.auth-btn,
.profile-btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--primary-bg);
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.35);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.auth-btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.auth-btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.25);
}

/* Sign In button using Buy Me a Coffee colors */
.auth-btn-coffee {
    background: linear-gradient(135deg, #FFDD57, #FF8177);
    color: #1a1f26;
    box-shadow: 0 4px 12px rgba(255, 221, 85, 0.3);
}

.auth-btn-coffee:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 221, 85, 0.4);
    color: #1a1f26;
}

.profile-btn-header {
    background: linear-gradient(135deg, #FFDD57, #FF8177);
    color: #1a1f26;
    padding-right: 0.9rem;
}

.profile-btn-header:hover {
    background: linear-gradient(135deg, #FFDD57, #FF8177);
    border-color: transparent;
    color: #1a1f26;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 221, 85, 0.4);
}

.profile-avatar-badge {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--primary-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 0 0 2px rgba(10, 14, 19, 0.9);
}

.profile-label {
    letter-spacing: 0.02em;
}

/* Profile dropdown menu */
.profile-menu {
    position: relative;
}

.profile-caret {
    font-size: 0.7rem;
    opacity: 0.7;
}

.profile-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--secondary-bg);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    padding: 0.4rem;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 1200;
}

.profile-menu-item {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.profile-menu-item:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 255, 136, 0.04));
    color: var(--accent-primary);
}

.profile-menu-item-logout {
    color: #fecaca;
    font-weight: 600;
}

.profile-menu-item-logout:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(248, 113, 113, 0.16));
    color: #ff9f9f;
}

.profile-menu:hover .profile-menu-dropdown,
.profile-menu:focus-within .profile-menu-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.profile-avatar-badge.profile-avatar-badge-image img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

/* + More navigation dropdown */
.nav-item--more {
    position: relative;
}

/* Direct AI nav items are hidden on desktop by default */
.nav-item--more-direct {
    display: none;
}

/* On mobile: hide + More and show direct AI nav items */
@media (max-width: 968px) {
    .nav-item--more {
        display: none;
    }

    .nav-item--more-direct {
        display: block;
    }
}

.nav-more-toggle {
    background: none;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font: inherit;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.nav-more-caret {
    font-size: 0.7rem;
    opacity: 0.7;
}

.nav-more-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 190px;
    background: var(--secondary-bg);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    padding: 0.4rem;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 1100;
}

.nav-more-item {
    display: block;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-more-item:hover,
.nav-more-item.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 255, 136, 0.04));
    color: var(--accent-primary);
}

.nav-item--more:hover .nav-more-dropdown,
.nav-item--more.nav-item--more-open .nav-more-dropdown,
.nav-item--more:focus-within .nav-more-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 968px) {
    .nav-item--more {
        width: 100%;
    }
    .nav-more-dropdown {
        right: auto;
        left: 0;
        top: 100%;
    }
}

/* Submit Tool Modal */
.submit-tool-modal {
    max-width: 600px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.submit-tool-content h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.submit-tool-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.submit-tool-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.submit-tool-form label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.submit-tool-form input,
.submit-tool-form select,
.submit-tool-form textarea {
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.submit-tool-form input:focus,
.submit-tool-form select:focus,
.submit-tool-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.submit-tool-form textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-form-btn {
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--primary-bg);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
    margin-top: 0.5rem;
}

.submit-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-actions {
        gap: 0.5rem;
    }
    
    .submit-tool-btn,
    .coffee-btn-header,
    .auth-btn,
    .profile-btn-header {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .submit-tool-modal {
        max-width: 95%;
        padding: 1.5rem;
    }
    
    .submit-tool-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .submit-tool-btn,
    .coffee-btn-header,
    .back-btn,
    .auth-btn,
    .profile-btn-header {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .submit-tool-modal {
        padding: 1rem;
    }
    
    .submit-tool-form {
        gap: 1rem;
    }
}
